Skip to content

Commit 09cdead

Browse files
committed
GUI: Fixed problem with absolute build dir
1 parent d3c9d06 commit 09cdead

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

gui/mainwindow.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,8 +847,12 @@ Settings MainWindow::getCppcheckSettings()
847847

848848
const QString &buildDir = mProjectFile->getBuildDir();
849849
if (!buildDir.isEmpty()) {
850-
QString prjpath = QFileInfo(mProjectFile->getFilename()).absolutePath();
851-
result.buildDir = (prjpath + '/' + buildDir).toStdString();
850+
if (QDir(buildDir).isAbsolute()) {
851+
result.buildDir = buildDir.toStdString();
852+
} else {
853+
QString prjpath = QFileInfo(mProjectFile->getFilename()).absolutePath();
854+
result.buildDir = (prjpath + '/' + buildDir).toStdString();
855+
}
852856
}
853857
}
854858

0 commit comments

Comments
 (0)