Skip to content
Snippets Groups Projects
Commit 2d4c144f authored by hjk's avatar hjk
Browse files

Valgrind: Disable start actions during building


This prevents multiple starts of the same tool.

Change-Id: I2df89fa4336ff649a56c4dfb1f721ac31497d396
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent bf3ba0f5
No related branches found
No related tags found
No related merge requests found
......@@ -782,16 +782,11 @@ void CallgrindTool::updateRunActions()
m_startAction->setToolTip(tr("A Valgrind Callgrind analysis is still in progress."));
m_stopAction->setEnabled(true);
} else {
const bool projectUsable = SessionManager::startupProject() != 0;
if (projectUsable) {
m_startAction->setEnabled(true);
m_startAction->setToolTip(tr("Start a Valgrind Callgrind analysis."));
m_stopAction->setEnabled(false);
} else {
m_startAction->setEnabled(false);
m_startAction->setToolTip(tr("Start a Valgrind Callgrind analysis."));
m_stopAction->setEnabled(false);
}
QString whyNot = tr("Start a Valgrind Callgrind analysis.");
bool canRun = ProjectExplorerPlugin::canRunStartupProject(CALLGRIND_RUN_MODE, &whyNot);
m_startAction->setToolTip(whyNot);
m_startAction->setEnabled(canRun);
m_stopAction->setEnabled(false);
}
}
void CallgrindTool::clearTextMarks()
......
......@@ -480,18 +480,15 @@ void MemcheckTool::updateRunActions()
m_startWithGdbAction->setToolTip(tr("A Valgrind Memcheck analysis is still in progress."));
m_stopAction->setEnabled(true);
} else {
const bool projectUsable = SessionManager::startupProject() != 0;
m_startAction->setToolTip(tr("Start a Valgrind Memcheck analysis."));
m_startWithGdbAction->setToolTip(tr("Start a Valgrind Memcheck with GDB analysis."));
if (projectUsable) {
m_startAction->setEnabled(true);
m_startWithGdbAction->setEnabled(true);
m_stopAction->setEnabled(false);
} else {
m_startAction->setEnabled(false);
m_startWithGdbAction->setEnabled(false);
m_stopAction->setEnabled(false);
}
QString whyNot = tr("Start a Valgrind Memcheck analysis.");
bool canRun = ProjectExplorerPlugin::canRunStartupProject(MEMCHECK_RUN_MODE, &whyNot);
m_startAction->setToolTip(whyNot);
m_startAction->setEnabled(canRun);
whyNot = tr("Start a Valgrind Memcheck with GDB analysis.");
canRun = ProjectExplorerPlugin::canRunStartupProject(MEMCHECK_WITH_GDB_RUN_MODE, &whyNot);
m_startWithGdbAction->setToolTip(whyNot);
m_startWithGdbAction->setEnabled(canRun);
m_stopAction->setEnabled(false);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment