aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickprofiler_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-11-04 15:38:48 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-11-17 16:18:12 +0000
commite010b64d38cb8533d779ac0fe8d609f00a6793e7 (patch)
tree11ff569fe3cee0832b96832bad108b5df9aeb3a0 /src/quick/util/qquickprofiler_p.h
parentfcc5a39d60b14e8ec2345b3695b84b552501dfa1 (diff)
QmlDebug: move QQuickProfiler into a plugin
This saves some code in QtQuick and allows us to split up QPacket into different versions for client and server. Change-Id: I9b8c723274fb11d6321c5002910148b193aa6b40 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/quick/util/qquickprofiler_p.h')
-rw-r--r--src/quick/util/qquickprofiler_p.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/quick/util/qquickprofiler_p.h b/src/quick/util/qquickprofiler_p.h
index 78216acc7d..4983adf63b 100644
--- a/src/quick/util/qquickprofiler_p.h
+++ b/src/quick/util/qquickprofiler_p.h
@@ -45,13 +45,14 @@
// We mean it.
//
-#include <private/qtquickglobal_p.h>
#include <QtCore/private/qabstractanimation_p.h>
-#include <QtQml/private/qqmlabstractprofileradapter_p.h>
-#include <QUrl>
-#include <QSize>
-#include <QMutex>
-#include <QThreadStorage>
+#include <QtQml/private/qqmlprofilerdefinitions_p.h>
+#include <QtQuick/private/qtquickglobal_p.h>
+
+#include <QtCore/qurl.h>
+#include <QtCore/qsize.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/qthreadstorage.h>
QT_BEGIN_NAMESPACE
@@ -164,8 +165,6 @@ struct Q_AUTOTEST_EXPORT QQuickProfilerData
int threadId;
int inputB; //used by input events
};
-
- void toByteArrays(QList<QByteArray> &messages) const;
};
Q_DECLARE_TYPEINFO(QQuickProfilerData, Q_MOVABLE_TYPE);
@@ -203,7 +202,7 @@ public:
}
};
-class Q_QUICK_PRIVATE_EXPORT QQuickProfiler : public QQmlAbstractProfilerAdapter {
+class Q_QUICK_PRIVATE_EXPORT QQuickProfiler : public QObject, public QQmlProfilerDefinitions {
Q_OBJECT
public:
@@ -314,7 +313,6 @@ public:
qint64 timestamp() { return m_timer.nsecsElapsed(); }
- qint64 sendMessages(qint64 until, QList<QByteArray> &messages);
static quint64 featuresEnabled;
static bool profilingSceneGraph()
@@ -322,19 +320,20 @@ public:
return featuresEnabled & (1 << QQuickProfiler::ProfileSceneGraph);
}
- static void initialize(QQmlProfilerService *service);
+ static void initialize(QObject *parent);
virtual ~QQuickProfiler();
protected:
- int next;
+ friend class QQuickProfilerAdapter;
+
static QQuickProfiler *s_instance;
QMutex m_dataMutex;
QElapsedTimer m_timer;
- QVarLengthArray<QQuickProfilerData> m_data;
+ QVector<QQuickProfilerData> m_data;
QQuickProfilerSceneGraphData m_sceneGraphData;
- QQuickProfiler(QQmlProfilerService *service);
+ QQuickProfiler(QObject *parent);
void processMessage(const QQuickProfilerData &message)
{
@@ -342,6 +341,9 @@ protected:
m_data.append(message);
}
+signals:
+ void dataReady(const QVector<QQuickProfilerData> &data);
+
protected slots:
void startProfilingImpl(quint64 features);
void stopProfilingImpl();