From f3f6d642e56130760260c1766facaf3cc6947512 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 24 Aug 2010 18:10:08 +0200 Subject: [PATCH] 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. --- src/plugins/qt4projectmanager/qtversionmanager.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index 61b70ef3565..96f5596d31f 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -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(); }