5#ifndef QQMLPROFILEREVENTTYPE_P_H
6#define QQMLPROFILEREVENTTYPE_P_H
11#include <QtCore/qstring.h>
12#include <QtCore/qmetatype.h>
13#include <QtCore/qhash.h>
28class QQmlProfilerEventType {
30 QQmlProfilerEventType(Message message = MaximumMessage, RangeType rangeType = MaximumRangeType,
32 const QQmlProfilerEventLocation &location = QQmlProfilerEventLocation(),
33 const QString &data = QString(),
const QString displayName = QString()) :
34 m_displayName(displayName), m_data(data), m_location(location), m_message(message),
35 m_rangeType(rangeType), m_detailType(detailType)
38 void setDisplayName(
const QString &displayName) { m_displayName = displayName; }
39 void setData(
const QString &data) { m_data = data; }
40 void setLocation(
const QQmlProfilerEventLocation &location) { m_location = location; }
42 ProfileFeature feature()
const;
43 QString displayName()
const {
return m_displayName; }
44 QString data()
const {
return m_data; }
45 QQmlProfilerEventLocation location()
const {
return m_location; }
46 Message message()
const {
return m_message; }
47 RangeType rangeType()
const {
return m_rangeType; }
48 int detailType()
const {
return m_detailType; }
51 friend QDataStream &operator>>(QDataStream &stream, QQmlProfilerEventType &type);
52 friend QDataStream &operator<<(QDataStream &stream,
const QQmlProfilerEventType &type);
54 QString m_displayName;
56 QQmlProfilerEventLocation m_location;
58 RangeType m_rangeType;
67 return qHash(type.location())
68 ^ (((type.message() << 12) & 0xf000)
69 | ((type.rangeType() << 24) & 0xf000000)
70 | ((
static_cast<uint>(type.detailType()) << 28) & 0xf0000000));
73inline bool operator==(
const QQmlProfilerEventType &type1,
const QQmlProfilerEventType &type2)
75 return type1.message() == type2.message() && type1.rangeType() == type2.rangeType()
76 && type1.detailType() == type2.detailType() && type1.location() == type2.location();
79inline bool operator!=(
const QQmlProfilerEventType &type1,
const QQmlProfilerEventType &type2)
81 return !(type1 == type2);
88Q_DECLARE_METATYPE(QQmlProfilerEventType)
friend bool operator==(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept
Returns true if lhs and rhs are equal, otherwise returns false.
friend bool operator!=(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept
Returns true if lhs and rhs are different, otherwise returns false.
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.
size_t qHash(const QHashedString &string)
Q_DECLARE_TYPEINFO(QObjectPrivate::ConnectionList, Q_RELOCATABLE_TYPE)
@ PixmapReferenceCountChanged
@ PixmapCacheCountChanged
@ SceneGraphAdaptationLayerFrame
@ SceneGraphTextureDeletion
@ SceneGraphWindowsAnimations
@ SceneGraphRenderLoopFrame
@ NumRenderThreadFrameTypes
@ SceneGraphWindowsRenderShow
@ MaximumSceneGraphFrameType
@ SceneGraphPolishAndSync
@ SceneGraphRendererFrame
@ SceneGraphTexturePrepare
QDataStream & operator<<(QDataStream &stream, const QQmlProfilerEvent &event)
QDataStream & operator>>(QDataStream &stream, QQmlProfilerEvent &event)
Q_DECLARE_TYPEINFO(QQmlProfilerEvent, Q_RELOCATABLE_TYPE)
bool operator==(const QQmlProfilerEvent &event1, const QQmlProfilerEvent &event2)
bool operator!=(const QQmlProfilerEvent &event1, const QQmlProfilerEvent &event2)
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)
QDataStream & operator<<(QDataStream &stream, const QImage &image)
[0]
QDataStream & operator>>(QDataStream &stream, QImage &image)