QmlProfiler: Avoid idle engine cancelling other engine's process

Task-number: QTCREATORBUG-9643

Change-Id: Ia0a2427a186fd9ad24e1cf620df48be13032a69b
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Kai Koehne
2013-06-25 17:13:51 +02:00
parent e02788b8ce
commit c219a5b514

View File

@@ -249,6 +249,10 @@ void QmlProfilerEngine::cancelProcess()
{ {
QTC_ASSERT(d->m_profilerState, return); QTC_ASSERT(d->m_profilerState, return);
// no process to be canceled? (there might be multiple engines, but only one runs a process)
if (!d->m_runner)
return;
switch (d->m_profilerState->currentState()) { switch (d->m_profilerState->currentState()) {
case QmlProfilerStateManager::AppReadyToStop : { case QmlProfilerStateManager::AppReadyToStop : {
d->m_profilerState->setCurrentState(QmlProfilerStateManager::AppStopped); d->m_profilerState->setCurrentState(QmlProfilerStateManager::AppStopped);