aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/dap
diff options
context:
space:
mode:
authorChristian Kandeler <[email protected]>2025-01-21 13:50:38 +0100
committerChristian Kandeler <[email protected]>2025-01-23 08:31:29 +0000
commit2bac487904d030fee3cb6b9d053cef86ac320304 (patch)
tree01f7024d75effadb0b2239774858aa01168ae27c /src/plugins/debugger/dap
parentca561567c4f13f30f8ee5add7dba84b9481a7ebe (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/debugger/dap')
-rw-r--r--src/plugins/debugger/dap/cmakedapengine.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/debugger/dap/cmakedapengine.cpp b/src/plugins/debugger/dap/cmakedapengine.cpp
index 8567c06e727..aef187eda14 100644
--- a/src/plugins/debugger/dap/cmakedapengine.cpp
+++ b/src/plugins/debugger/dap/cmakedapengine.cpp
@@ -114,7 +114,7 @@ void CMakeDapEngine::setupEngine()
QTC_ASSERT(state() == EngineSetupRequested, qCDebug(logCategory()) << state());
qCDebug(logCategory()) << "build system name"
- << ProjectExplorer::ProjectTree::currentBuildSystem()->name();
+ << ProjectExplorer::activeBuildSystemForCurrentProject()->name();
IDataProvider *dataProvider;
if (TemporaryDirectory::masterDirectoryFilePath().osType() == Utils::OsType::OsTypeWindows) {
@@ -127,12 +127,12 @@ void CMakeDapEngine::setupEngine()
m_dapClient = new CMakeDapClient(dataProvider, this);
connectDataGeneratorSignals();
- connect(ProjectExplorer::ProjectTree::currentBuildSystem(),
+ connect(ProjectExplorer::activeBuildSystemForCurrentProject(),
&ProjectExplorer::BuildSystem::debuggingStarted,
this,
[this] { m_dapClient->dataProvider()->start(); });
- ProjectExplorer::ProjectTree::currentBuildSystem()->requestDebugging();
+ ProjectExplorer::activeBuildSystemForCurrentProject()->requestDebugging();
QTimer::singleShot(5000, this, [this] {
if (!m_dapClient->dataProvider()->isRunning()) {