Commit ff9e55d5 authored by Ulf Hermann's avatar Ulf Hermann

QmlProfiler: Use stop dependencies for RunWorkers

Change-Id: If4d0af85c6e537e6d9a35dc877f7542c91a2bc13
Reviewed-by: default avatarhjk <hjk@qt.io>
parent a028f671
......@@ -133,7 +133,7 @@ void QmlProfilerRunner::stop()
switch (d->m_profilerState->currentState()) {
case QmlProfilerStateManager::AppRunning:
d->m_profilerState->setCurrentState(QmlProfilerStateManager::AppStopRequested);
break;
return; // Don't reportStopped() here. We are still waiting for data.
case QmlProfilerStateManager::AppStopRequested:
// Pressed "stop" a second time. Kill the application without collecting data
d->m_profilerState->setCurrentState(QmlProfilerStateManager::Idle);
......@@ -257,6 +257,7 @@ void QmlProfilerRunner::profilerStateChanged()
switch (d->m_profilerState->currentState()) {
case QmlProfilerStateManager::Idle:
d->m_noDebugOutputTimer.stop();
reportStopped();
break;
default:
break;
......@@ -309,6 +310,7 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const Q
m_profiler = new QmlProfilerRunner(runControl);
m_profiler->setServerUrl(serverUrl);
m_profiler->addStartDependency(this);
addStopDependency(m_profiler);
StandardRunnable debuggee = runnable().as<StandardRunnable>();
QString arguments = QmlDebug::qmlDebugArguments(QmlDebug::QmlProfilerServices, serverUrl);
......@@ -322,6 +324,7 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const Q
m_profilee = new SimpleTargetRunner(runControl);
m_profilee->setRunnable(debuggee);
addStartDependency(m_profilee);
m_profilee->addStopDependency(this);
}
void LocalQmlProfilerSupport::start()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment