From 40600cbc3815079a118f15bc4e10854334b0e4ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 17 Jul 2019 16:01:54 +0200 Subject: [PATCH] GUI: Fixed build directory, use project file path by default --- gui/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 9769521e1..45cb34002 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -1480,7 +1480,7 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile, const bool check // file's location directory as root path if (rootpath.isEmpty() || rootpath == ".") mCurrentDirectory = inf.canonicalPath(); - else if (rootpath.startsWith(".")) + else if (rootpath.startsWith("./")) mCurrentDirectory = inf.canonicalPath() + rootpath.mid(1); else mCurrentDirectory = rootpath; @@ -1488,7 +1488,7 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile, const bool check if (!projectFile->getBuildDir().isEmpty()) { QString buildDir = projectFile->getBuildDir(); if (!QDir::isAbsolutePath(buildDir)) - buildDir = mCurrentDirectory + '/' + buildDir; + buildDir = inf.canonicalPath() + '/' + buildDir; if (!QDir(buildDir).exists()) { QMessageBox msg(QMessageBox::Critical, tr("Cppcheck"),