4#ifndef QQMLPROFILEREVENTTYPE_P_H
5#define QQMLPROFILEREVENTTYPE_P_H
10#include <QtCore/qstring.h>
11#include <QtCore/qmetatype.h>
12#include <QtCore/qhash.h>
27class QQmlProfilerEventType {
29 QQmlProfilerEventType(Message message = MaximumMessage, RangeType rangeType = MaximumRangeType,
31 const QQmlProfilerEventLocation &location = QQmlProfilerEventLocation(),
32 const QString &data = QString(),
const QString displayName = QString()) :
33 m_displayName(displayName), m_data(data), m_location(location), m_message(message),
34 m_rangeType(rangeType), m_detailType(detailType)
37 void setDisplayName(
const QString &displayName) { m_displayName = displayName; }
38 void setData(
const QString &data) { m_data = data; }
39 void setLocation(
const QQmlProfilerEventLocation &location) { m_location = location; }
41 ProfileFeature feature()
const;
42 QString displayName()
const {
return m_displayName; }
43 QString data()
const {
return m_data; }
44 QQmlProfilerEventLocation location()
const {
return m_location; }
45 Message message()
const {
return m_message; }
46 RangeType rangeType()
const {
return m_rangeType; }
47 int detailType()
const {
return m_detailType; }
50 friend QDataStream &operator>>(QDataStream &stream, QQmlProfilerEventType &type);
51 friend QDataStream &operator<<(QDataStream &stream,
const QQmlProfilerEventType &type);
53 QString m_displayName;
55 QQmlProfilerEventLocation m_location;
57 RangeType m_rangeType;
66 return qHash(type.location())
67 ^ (((type.message() << 12) & 0xf000)
68 | ((type.rangeType() << 24) & 0xf000000)
69 | ((
static_cast<uint>(type.detailType()) << 28) & 0xf0000000));
72inline bool operator==(
const QQmlProfilerEventType &type1,
const QQmlProfilerEventType &type2)
74 return type1.message() == type2.message() && type1.rangeType() == type2.rangeType()
75 && type1.detailType() == type2.detailType() && type1.location() == type2.location();
78inline bool operator!=(
const QQmlProfilerEventType &type1,
const QQmlProfilerEventType &type2)
80 return !(type1 == type2);
87Q_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)
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)