From e3586d164b130bf241ba1f919e54f0216a3776c7 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 10 Apr 2019 16:34:13 +0200 Subject: [PATCH] QmakeProjectManager: Fix warning about build/source directory levels While configuring a project, a wrong warning "Warning: The build directory should be at the same level as the source directory." was shown in some cases. The reason was the innocent assumption that "projectPath" was just the directory part of the project root. It was in fact the full "file path" of the .pro file. Change-Id: Icc5df51423b4bb05098d9d42cd328af949f85005 Reviewed-by: Christian Kandeler --- src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp index 0b37c741804..e393e75a51d 100644 --- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp @@ -591,7 +591,7 @@ QmakeBuildConfigurationFactory::QmakeBuildConfigurationFactory() issues << version->reportIssues(projectPath, buildDir); if (QmakeSettings::warnAgainstUnalignedBuildDir() && !QmakeBuildConfiguration::isBuildDirAtSafeLocation( - QDir(projectPath).absolutePath(), QDir(buildDir).absolutePath())) { + QFileInfo(projectPath).absoluteDir().path(), QDir(buildDir).absolutePath())) { issues.append(Task(Task::Warning, QmakeBuildConfiguration::unalignedBuildDirWarning(), Utils::FileName(), -1, ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));