diff options
author | Christian Kandeler <[email protected]> | 2025-01-21 13:50:38 +0100 |
---|---|---|
committer | Christian Kandeler <[email protected]> | 2025-01-23 08:31:29 +0000 |
commit | 2bac487904d030fee3cb6b9d053cef86ac320304 (patch) | |
tree | 01f7024d75effadb0b2239774858aa01168ae27c /src/plugins/qmlprofiler/qmlprofilertool.cpp | |
parent | ca561567c4f13f30f8ee5add7dba84b9481a7ebe (diff) |
ProjectExplorer: Add convenience accessors to some classes
Namely, Kit, BuildConfiguration, BuildSystem and RunConfiguration get
functions to retrieve the active instance for a given project as well as
the one for the current and active projects, respectively.
This saves a ton of annoying null pointer checks.
Some of these functions replace existing ones with the same purpose that
were scattered around the code base.
Change-Id: I18247061229bbeb8b8ad1e15a2bd7a6626438bc0
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertool.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertool.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index f3c2affd0cf..cc456bc448f 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -555,7 +555,7 @@ ProjectExplorer::RunControl *QmlProfilerTool::attachToWaitingApplication() d->m_viewContainer->perspective()->select(); auto runControl = new RunControl(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); - runControl->copyDataFromRunConfiguration(ProjectManager::startupRunConfiguration()); + runControl->copyDataFromRunConfiguration(activeRunConfigForActiveProject()); // The object as such is needed, the RunWorker becomes part of the RunControl at construction time, // similar to how QObject children are owned by their parents [[maybe_unused]] auto profiler = new QmlProfilerRunner(runControl); |