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());
|
QFileInfo qmake(r1.cap(1).trimmed());
|
||||||
QString qmakePath = qmake.filePath();
|
QString qmakePath = qmake.filePath();
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
qmakePath = qmakePath.toLower();
|
|
||||||
if (!qmakePath.endsWith(QLatin1String(".exe")))
|
if (!qmakePath.endsWith(QLatin1String(".exe")))
|
||||||
qmakePath.append(QLatin1String(".exe"));
|
qmakePath.append(QLatin1String(".exe"));
|
||||||
#endif
|
#endif
|
||||||
// Is qmake still installed?
|
// 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;
|
return qmakePath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
makefile.close();
|
}
|
||||||
}
|
}
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user