QmlProfiler: Initialize members of ...Private class in own ctor

Change-Id: I70f897df83a413f322127905e6310c64d7ce9b81
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Robert Loehning
2018-07-27 14:00:32 +02:00
parent f8fb8767da
commit fc399d9bb7

View File

@@ -47,7 +47,10 @@ inline QString stringForState(int state) {
class QmlProfilerStateManager::QmlProfilerStateManagerPrivate class QmlProfilerStateManager::QmlProfilerStateManagerPrivate
{ {
public: public:
QmlProfilerStateManagerPrivate(QmlProfilerStateManager *qq) : q(qq) {} QmlProfilerStateManagerPrivate(QmlProfilerStateManager *qq)
: q(qq), m_currentState(Idle), m_clientRecording(true), m_serverRecording(false),
m_requestedFeatures(0), m_recordedFeatures(0) {}
~QmlProfilerStateManagerPrivate() {} ~QmlProfilerStateManagerPrivate() {}
QmlProfilerStateManager *q; QmlProfilerStateManager *q;
@@ -59,14 +62,7 @@ public:
quint64 m_recordedFeatures; quint64 m_recordedFeatures;
}; };
QmlProfilerStateManager::QmlProfilerStateManager(QObject *parent) : QmlProfilerStateManager::QmlProfilerStateManager(QObject *parent) :
QObject(parent),d(new QmlProfilerStateManagerPrivate(this)) QObject(parent),d(new QmlProfilerStateManagerPrivate(this)) {}
{
d->m_currentState = Idle;
d->m_clientRecording = true;
d->m_serverRecording = false;
d->m_requestedFeatures = 0;
d->m_recordedFeatures = 0;
}
QmlProfilerStateManager::~QmlProfilerStateManager() QmlProfilerStateManager::~QmlProfilerStateManager()
{ {