CMakePM: Code readability fix

Amends b240bfb3db

Having the assignement sepparate makes the code easier to understand.

Change-Id: I10112224c9752788e157012d53f638406b79793b
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Cristian Adam
2024-06-18 18:28:09 +02:00
parent 6db4c7af32
commit 660e579760

View File

@@ -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