forked from qt-creator/qt-creator
Properly detect Qt versions of directories
* Detection of Qt versions from a makefile failed on windows when calling qmake without the drive letter. Make this work.
This commit is contained in:
@@ -807,16 +807,20 @@ QString QtVersionManager::findQMakeBinaryFromMakefile(const QString &directory)
|
||||
QFileInfo qmake(r1.cap(1).trimmed());
|
||||
QString qmakePath = qmake.filePath();
|
||||
#ifdef Q_OS_WIN
|
||||
qmakePath = qmakePath.toLower();
|
||||
if (!qmakePath.endsWith(QLatin1String(".exe")))
|
||||
qmakePath.append(QLatin1String(".exe"));
|
||||
#endif
|
||||
// Is qmake still installed?
|
||||
if (QFile::exists(qmakePath))
|
||||
QFileInfo fi(qmakePath);
|
||||
if (fi.exists()) {
|
||||
qmakePath = fi.absoluteFilePath();
|
||||
#ifdef Q_OS_WIN
|
||||
qmakePath = qmakePath.toLower();
|
||||
#endif
|
||||
return qmakePath;
|
||||
}
|
||||
}
|
||||
makefile.close();
|
||||
}
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
Reference in New Issue
Block a user