forked from qt-creator/qt-creator
ProjectExplorerPlugin: Use expected_str for canRunStartupProject()
Change-Id: Iddc9abcb1b9ef02c6a8188d2eb82cc30a0ba4c22 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -770,10 +770,10 @@ void CallgrindToolPrivate::updateRunActions()
|
||||
m_startAction->setToolTip(Tr::tr("A Valgrind Callgrind analysis is still in progress."));
|
||||
m_stopAction->setEnabled(true);
|
||||
} else {
|
||||
QString whyNot = Tr::tr("Start a Valgrind Callgrind analysis.");
|
||||
bool canRun = ProjectExplorerPlugin::canRunStartupProject(CALLGRIND_RUN_MODE, &whyNot);
|
||||
m_startAction->setToolTip(whyNot);
|
||||
m_startAction->setEnabled(canRun);
|
||||
const auto canRun = ProjectExplorerPlugin::canRunStartupProject(CALLGRIND_RUN_MODE);
|
||||
m_startAction->setToolTip(canRun ? Tr::tr("Start a Valgrind Callgrind analysis.")
|
||||
: canRun.error());
|
||||
m_startAction->setEnabled(bool(canRun));
|
||||
m_stopAction->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user