GUI: Fixed build directory, use project file path by default
This commit is contained in:
parent
64ef879ebf
commit
40600cbc38
|
@ -1480,7 +1480,7 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile, const bool check
|
||||||
// file's location directory as root path
|
// file's location directory as root path
|
||||||
if (rootpath.isEmpty() || rootpath == ".")
|
if (rootpath.isEmpty() || rootpath == ".")
|
||||||
mCurrentDirectory = inf.canonicalPath();
|
mCurrentDirectory = inf.canonicalPath();
|
||||||
else if (rootpath.startsWith("."))
|
else if (rootpath.startsWith("./"))
|
||||||
mCurrentDirectory = inf.canonicalPath() + rootpath.mid(1);
|
mCurrentDirectory = inf.canonicalPath() + rootpath.mid(1);
|
||||||
else
|
else
|
||||||
mCurrentDirectory = rootpath;
|
mCurrentDirectory = rootpath;
|
||||||
|
@ -1488,7 +1488,7 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile, const bool check
|
||||||
if (!projectFile->getBuildDir().isEmpty()) {
|
if (!projectFile->getBuildDir().isEmpty()) {
|
||||||
QString buildDir = projectFile->getBuildDir();
|
QString buildDir = projectFile->getBuildDir();
|
||||||
if (!QDir::isAbsolutePath(buildDir))
|
if (!QDir::isAbsolutePath(buildDir))
|
||||||
buildDir = mCurrentDirectory + '/' + buildDir;
|
buildDir = inf.canonicalPath() + '/' + buildDir;
|
||||||
if (!QDir(buildDir).exists()) {
|
if (!QDir(buildDir).exists()) {
|
||||||
QMessageBox msg(QMessageBox::Critical,
|
QMessageBox msg(QMessageBox::Critical,
|
||||||
tr("Cppcheck"),
|
tr("Cppcheck"),
|
||||||
|
|
Loading…
Reference in New Issue