diff options
Diffstat (limited to 'qmake/option.cpp')
-rw-r--r-- | qmake/option.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/qmake/option.cpp b/qmake/option.cpp index 4da2a1ae2c..9737f1f680 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -352,16 +352,19 @@ Option::init(int argc, char **argv) } } } - if (!globals->qmake_abslocation.isNull()) - globals->qmake_abslocation = QDir::cleanPath(globals->qmake_abslocation); - else // This is rather unlikely to ever happen on a modern system ... - globals->qmake_abslocation = QLibraryInfo::rawLocation(QLibraryInfo::HostBinariesPath, - QLibraryInfo::EffectivePaths) + + if (Q_UNLIKELY(globals->qmake_abslocation.isNull())) { + // This is rather unlikely to ever happen on a modern system ... + globals->qmake_abslocation = QLibraryInfo::rawLocation( + QLibraryInfo::HostBinariesPath, + QLibraryInfo::EffectivePaths) #ifdef Q_OS_WIN - "/qmake.exe"; + + "/qmake.exe"; #else - "/qmake"; + + "/qmake"; #endif + } else { + globals->qmake_abslocation = QDir::cleanPath(globals->qmake_abslocation); + } } else { Option::qmake_mode = Option::QMAKE_GENERATE_MAKEFILE; } |