From 1c2e0f387f552d3fbe98050f8629c11829ec95f7 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 5 Apr 2018 09:47:33 +0200 Subject: QmlProfiler: Move parts of model manager and trace file to Timeline This way we can use the trace file loading and saving mechanism for other profilers. Change-Id: I98ec1cdde6f7abcea152cabf72e64d4e696dfa59 Reviewed-by: Tobias Hunger --- src/plugins/qmlprofiler/qmlprofilertool.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/plugins/qmlprofiler/qmlprofilertool.cpp') diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index e7542f6e52..0fba9affef 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -505,14 +506,14 @@ void QmlProfilerTool::showTimeLineSearch() void QmlProfilerTool::clearEvents() { - d->m_profilerModelManager->clearEvents(); + d->m_profilerModelManager->clear(); d->m_profilerConnections->clearEvents(); setRecordedFeatures(0); } void QmlProfilerTool::clearData() { - d->m_profilerModelManager->clear(); + d->m_profilerModelManager->clearAll(); d->m_profilerConnections->clearBufferedData(); setRecordedFeatures(0); } @@ -666,7 +667,9 @@ void QmlProfilerTool::showSaveDialog() filename += zFile; saveLastTraceFile(filename); Debugger::enableMainWindow(false); - d->m_profilerModelManager->save(filename); + Core::ProgressManager::addTask(d->m_profilerModelManager->save(filename), + tr("Saving Trace Data"), TASK_SAVE, + Core::ProgressManager::ShowInApplicationIcon); } } @@ -690,7 +693,8 @@ void QmlProfilerTool::showLoadDialog() connect(d->m_profilerModelManager, &QmlProfilerModelManager::recordedFeaturesChanged, this, &QmlProfilerTool::setRecordedFeatures); d->m_profilerModelManager->populateFileFinder(); - d->m_profilerModelManager->load(filename); + Core::ProgressManager::addTask(d->m_profilerModelManager->load(filename), + tr("Loading Trace Data"), TASK_LOAD); } } @@ -740,7 +744,7 @@ void QmlProfilerTool::clientsDisconnected() d->m_profilerState->currentState() == QmlProfilerStateManager::Idle) { showNonmodalWarning(tr("Application finished before loading profiled data.\n" "Please use the stop button instead.")); - d->m_profilerModelManager->clear(); + d->m_profilerModelManager->clearAll(); } } } @@ -912,7 +916,7 @@ void QmlProfilerTool::serverRecordingChanged() if (!d->m_profilerModelManager->aggregateTraces() || d->m_profilerModelManager->state() == QmlProfilerModelManager::Done) clearEvents(); - d->m_profilerModelManager->startAcquiring(); + d->m_profilerModelManager->initialize(); } else { d->m_recordingTimer.stop(); if (!d->m_profilerModelManager->aggregateTraces()) -- cgit v1.2.1