summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2012-10-29 12:43:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-05 14:03:35 +0100
commit0e75115e557b4cf1c737e3e5524f876a6b85a39e (patch)
tree185e6266fdf894a96b3aa357718261953a8c52a8
parent10b2503195dc0d8a98f365e59c7acb602ae4ab3a (diff)
rewrite default spec handling
instead of symlinking (on unix) or creating a forwarding spec (on windows), just put the default specs into (the bootstrapped) QLibraryInfo. Change-Id: I595500ef7399f77cb8ec117c4303bc0a2ffe505f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from qtbase/7d20f3dd1065a20b40cb4689783fba05190fe317)
-rw-r--r--src/linguist/shared/qmakeevaluator.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/linguist/shared/qmakeevaluator.cpp b/src/linguist/shared/qmakeevaluator.cpp
index f598cd03b..486ce4c49 100644
--- a/src/linguist/shared/qmakeevaluator.cpp
+++ b/src/linguist/shared/qmakeevaluator.cpp
@@ -1112,20 +1112,23 @@ bool QMakeEvaluator::loadSpecInternal()
evalError(fL1S("Could not read qmake configuration file %1.").arg(spec));
return false;
}
-#ifdef Q_OS_UNIX
+#ifndef QT_BUILD_QMAKE
+ // Legacy support for Qt4 default specs
+# ifdef Q_OS_UNIX
if (m_qmakespec.endsWith(QLatin1String("/default-host"))
|| m_qmakespec.endsWith(QLatin1String("/default"))) {
QString rspec = QFileInfo(m_qmakespec).readLink();
if (!rspec.isEmpty())
m_qmakespec = QDir::cleanPath(QDir(m_qmakespec).absoluteFilePath(rspec));
}
-#else
+# else
// We can't resolve symlinks as they do on Unix, so configure.exe puts
// the source of the qmake.conf at the end of the default/qmake.conf in
// the QMAKESPEC_ORIGINAL variable.
const ProString &orig_spec = first(ProKey("QMAKESPEC_ORIGINAL"));
if (!orig_spec.isEmpty())
m_qmakespec = orig_spec.toQString();
+# endif
#endif
valuesRef(ProKey("QMAKESPEC")) << ProString(m_qmakespec);
m_qmakespecName = IoUtils::fileName(m_qmakespec).toString();
@@ -1170,7 +1173,12 @@ bool QMakeEvaluator::loadSpec()
updateMkspecPaths();
if (qmakespec.isEmpty())
- qmakespec = m_hostBuild ? QLatin1String("default-host") : QLatin1String("default");
+ qmakespec = propertyValue(ProKey(m_hostBuild ? "QMAKE_SPEC" : "QMAKE_XSPEC")).toQString();
+#ifndef QT_BUILD_QMAKE
+ // Legacy support for Qt4 qmake in Qt Creator, etc.
+ if (qmakespec.isEmpty())
+ qmakespec = QLatin1String("default-host") : QLatin1String("default");
+#endif
if (IoUtils::isRelativePath(qmakespec)) {
foreach (const QString &root, m_mkspecPaths) {
QString mkspec = root + QLatin1Char('/') + qmakespec;