Use QT_INSTALL_DATA instead of path() for searching the debugger helper

This commit is contained in:
dt
2009-04-08 15:16:02 +02:00
parent 8261498c11
commit e6779aaeb2
2 changed files with 18 additions and 5 deletions

View File

@@ -171,9 +171,16 @@ QString CMakeManager::findQtDir(const ProjectExplorer::Environment &env)
QFileInfo qmake(path + "/" + possibleCommand);
if (qmake.exists()) {
if (!qtVersionForQMake(qmake.absoluteFilePath()).isNull()) {
QDir dir(qmake.absoluteDir());
dir.cdUp();
return dir.absolutePath();
QProcess proc;
proc.start(qmake.absoluteFilePath(), QStringList() << "-query" << "QT_INSTALL_DATA");
if (proc.waitForFinished()) {
return proc.readAll().trimmed();
} else {
proc.kill();
QDir dir(qmake.absoluteDir());
dir.cdUp();
return dir.absolutePath();
}
}
}
}