aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilertool.cpp
diff options
context:
space:
mode:
authorJarek Kobus <[email protected]>2023-07-06 18:16:59 +0200
committerJarek Kobus <[email protected]>2023-07-07 08:23:29 +0000
commit9f1b56e91aa34bb706bf2887d1cd06ca5d5ed376 (patch)
treefba6f83f71b6c8560a4a6e93ed8fea5ecd216e8b /src/plugins/qmlprofiler/qmlprofilertool.cpp
parent714b5963f79570b5dc10eb62aeb65bc8bb7bb4b4 (diff)
ProjectExplorerPlugin: Use expected_str for canRunStartupProject()
Change-Id: Iddc9abcb1b9ef02c6a8188d2eb82cc30a0ba4c22 Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertool.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index c87562e3f9b..59a740e3b5d 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -276,11 +276,11 @@ void QmlProfilerTool::updateRunActions()
d->m_startAction->setToolTip(Tr::tr("A QML Profiler analysis is still in progress."));
d->m_stopAction->setEnabled(true);
} else {
- QString tooltip = Tr::tr("Start QML Profiler analysis.");
- bool canRun = ProjectExplorerPlugin::canRunStartupProject
- (ProjectExplorer::Constants::QML_PROFILER_RUN_MODE, &tooltip);
- d->m_startAction->setToolTip(tooltip);
- d->m_startAction->setEnabled(canRun);
+ const auto canRun = ProjectExplorerPlugin::canRunStartupProject(
+ ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
+ d->m_startAction->setToolTip(canRun ? Tr::tr("Start QML Profiler analysis.")
+ : canRun.error());
+ d->m_startAction->setEnabled(bool(canRun));
d->m_stopAction->setEnabled(false);
}
}