From 660e57976081b93a01b629caf389731d9d000e5b Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Tue, 18 Jun 2024 18:28:09 +0200 Subject: [PATCH] CMakePM: Code readability fix Amends b240bfb3dbd7b0da4be1490f7262bcc2c5542731 Having the assignement sepparate makes the code easier to understand. Change-Id: I10112224c9752788e157012d53f638406b79793b Reviewed-by: hjk --- src/plugins/cmakeprojectmanager/cmakeeditor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp index 92f63ea04c7..c4e91031015 100644 --- a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp @@ -330,7 +330,8 @@ void CMakeEditorWidget::findLinkAt(const QTextCursor &cursor, if (auto project = ProjectTree::currentProject()) { buffer.replace("${CMAKE_SOURCE_DIR}", project->projectDirectory().path()); - if (auto bs = ProjectTree::currentBuildSystem(); bs && bs->buildConfiguration()) { + auto bs = ProjectTree::currentBuildSystem(); + if (bs && bs->buildConfiguration()) { buffer.replace("${CMAKE_BINARY_DIR}", bs->buildConfiguration()->buildDirectory().path()); // Get the path suffix from current source dir to project source dir and apply it