QmlProfiler: Move unrelated code out of QmlProfilerClientManager

The client manager should not be bothered with details of QML events,
but rather just connect the client, the model manager, and the state
manager.

Change-Id: Iec4499f8441a06d4ef5cbcf7bfe23da6f5e7f239
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Ulf Hermann
2016-08-04 17:29:05 +02:00
parent 4ab130ed9f
commit 5d6f5ff2c9
10 changed files with 67 additions and 126 deletions

View File

@@ -149,6 +149,7 @@ public:
quint64 availableFeatures;
quint64 visibleFeatures;
quint64 recordedFeatures;
bool aggregateTraces;
QHash<ProfileFeature, QVector<EventLoader> > eventLoaders;
QVector<Finalizer> finalizers;
@@ -164,6 +165,7 @@ QmlProfilerModelManager::QmlProfilerModelManager(Utils::FileInProjectFinder *fin
d->availableFeatures = 0;
d->visibleFeatures = 0;
d->recordedFeatures = 0;
d->aggregateTraces = false;
d->model = new QmlProfilerDataModel(finder, this);
d->state = Empty;
d->traceTime = new QmlProfilerTraceTime(this);
@@ -275,6 +277,17 @@ void QmlProfilerModelManager::setRecordedFeatures(quint64 features)
}
}
bool QmlProfilerModelManager::aggregateTraces() const
{
return d->aggregateTraces;
}
void QmlProfilerModelManager::setAggregateTraces(bool aggregateTraces)
{
d->aggregateTraces = aggregateTraces;
}
const char *QmlProfilerModelManager::featureName(ProfileFeature feature)
{
return ProfileFeatureNames[feature];