ClangStaticAnalyzer: Disable start actions during building

Helps to prevent multiple starts of the tool in parallel.

Also fix a copy-and-paste tooltip error.

Change-Id: I4a7fb5e4ba17981b419420a7871b130f74e5ecde
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
hjk
2016-03-10 13:50:12 +01:00
parent d122c34c96
commit d7b0c41c6b

View File

@@ -281,18 +281,15 @@ void ClangStaticAnalyzerTool::updateRunActions()
{
if (m_toolBusy) {
m_startAction->setEnabled(false);
m_startAction->setToolTip(tr("A Clang analysis is still in progress."));
m_startAction->setToolTip(tr("Clang Static Analyzer is still running."));
m_stopAction->setEnabled(true);
} else {
const bool projectUsable = SessionManager::startupProject() != 0;
m_startAction->setToolTip(tr("Start Qml Profiler."));
if (projectUsable) {
m_startAction->setEnabled(true);
m_stopAction->setEnabled(false);
} else {
m_startAction->setEnabled(false);
m_stopAction->setEnabled(false);
}
QString whyNot = tr("Start Clang Static Analyzer.");
bool canRun = ProjectExplorerPlugin::canRunStartupProject(
Constants::CLANGSTATICANALYZER_RUN_MODE, &whyNot);
m_startAction->setToolTip(whyNot);
m_startAction->setEnabled(canRun);
m_stopAction->setEnabled(false);
}
}
void ClangStaticAnalyzerTool::setBusyCursor(bool busy)