QmlProfiler: Disable start actions during building

Helps to prevent multiple starts of the tool in parallel.

Change-Id: Ibd2d0a66e7ce08ea07604f13fbee6d18a40dfc39
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
This commit is contained in:
hjk
2016-03-10 13:30:15 +01:00
parent 1b0d00ef0c
commit 5996ff0ab8

View File

@@ -298,15 +298,12 @@ void QmlProfilerTool::updateRunActions()
d->m_startAction->setToolTip(tr("A Qml Profiler analysis is still in progress."));
d->m_stopAction->setEnabled(true);
} else {
const bool projectUsable = SessionManager::startupProject() != 0;
d->m_startAction->setToolTip(tr("Start Qml Profiler."));
if (projectUsable) {
d->m_startAction->setEnabled(true);
d->m_stopAction->setEnabled(false);
} else {
d->m_startAction->setEnabled(false);
d->m_stopAction->setEnabled(false);
}
QString whyNot = tr("Start Qml Profiler analysis.");
bool canRun = ProjectExplorerPlugin::canRunStartupProject
(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE, &whyNot);
d->m_startAction->setToolTip(whyNot);
d->m_startAction->setEnabled(canRun);
d->m_stopAction->setEnabled(false);
}
}