forked from qt-creator/qt-creator
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:
@@ -330,7 +330,8 @@ void CMakeEditorWidget::findLinkAt(const QTextCursor &cursor,
|
|||||||
|
|
||||||
if (auto project = ProjectTree::currentProject()) {
|
if (auto project = ProjectTree::currentProject()) {
|
||||||
buffer.replace("${CMAKE_SOURCE_DIR}", project->projectDirectory().path());
|
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());
|
buffer.replace("${CMAKE_BINARY_DIR}", bs->buildConfiguration()->buildDirectory().path());
|
||||||
|
|
||||||
// Get the path suffix from current source dir to project source dir and apply it
|
// Get the path suffix from current source dir to project source dir and apply it
|
||||||
|
Reference in New Issue
Block a user