diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-04-05 09:47:33 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-04-19 08:09:07 +0000 |
commit | 1c2e0f387f552d3fbe98050f8629c11829ec95f7 (patch) | |
tree | 1a03f9f0e5c68f384d5940f19a59017f648a820a /src/plugins/qmlprofiler/qmlprofilertool.cpp | |
parent | 7099f215865d90b69906dc92da77857fa0e66165 (diff) | |
download | qt-creator-1c2e0f387f552d3fbe98050f8629c11829ec95f7.tar.gz |
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 <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertool.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertool.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
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 <coreplugin/messagemanager.h> #include <coreplugin/helpmanager.h> #include <coreplugin/modemanager.h> +#include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/imode.h> #include <coreplugin/actionmanager/command.h> #include <coreplugin/actionmanager/actionmanager.h> @@ -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()) |