5#ifndef QQMLPROFILEREVENTLOCATION_P_H
6#define QQMLPROFILEREVENTLOCATION_P_H
8#include <QtCore/qstring.h>
9#include <QtCore/qhash.h>
10#include <QtCore/qdatastream.h>
11#include <QtCore/private/qglobal_p.h>
26class QQmlProfilerEventLocation
29 QQmlProfilerEventLocation() : m_line(-1),m_column(-1) {}
30 QQmlProfilerEventLocation(
const QString &file,
int lineNumber,
int columnNumber) :
31 m_filename(file), m_line(lineNumber), m_column(columnNumber)
37 m_line = m_column = -1;
42 return !m_filename.isEmpty();
45 QString filename()
const {
return m_filename; }
46 int line()
const {
return m_line; }
47 int column()
const {
return m_column; }
51 friend QDataStream &
operator<<(QDataStream &stream,
const QQmlProfilerEventLocation &location);
58inline bool operator==(
const QQmlProfilerEventLocation &location1,
59 const QQmlProfilerEventLocation &location2)
62 return location1.line() == location2.line() && location1.column() == location2.column()
63 && location1.filename() == location2.filename();
66inline bool operator!=(
const QQmlProfilerEventLocation &location1,
67 const QQmlProfilerEventLocation &location2)
69 return !(location1
== location2);
74 return qHash(location.filename())
75 ^ ((location.line() & 0xfff)
76 | ((location.column() << 16) & 0xff0000));
void setFlushInterval(quint32 flushInterval)
quint64 recordedFeatures() const
void traceFinished(qint64 timestamp, const QList< int > &engineIds)
void setRequestedFeatures(quint64 features)
void recordedFeaturesChanged(quint64 features)
void traceStarted(qint64 timestamp, const QList< int > &engineIds)
virtual void messageReceived(const QByteArray &) override
void recordingChanged(bool arg)
QQmlProfilerClient(QQmlProfilerClientPrivate &dd)
void onStateChanged(State status)
void sendRecordingStatus(int engineId=-1)
Combined button and popup list for selecting options.
QDataStream & operator<<(QDataStream &stream, const QQmlProfilerEventLocation &location)
size_t qHash(const QQmlProfilerEventLocation &location)
Q_DECLARE_TYPEINFO(QQmlProfilerEventLocation, Q_RELOCATABLE_TYPE)
bool operator!=(const QQmlProfilerEventLocation &location1, const QQmlProfilerEventLocation &location2)
bool operator==(const QQmlProfilerEventLocation &location1, const QQmlProfilerEventLocation &location2)
QDataStream & operator>>(QDataStream &stream, QQmlProfilerEventLocation &location)