diff options
author | Eike Ziller <eike.ziller@digia.com> | 2012-11-09 11:20:10 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2012-11-09 11:20:10 +0100 |
commit | fe74a9a722e50b16b7f3f73ae96fb891f8613c3c (patch) | |
tree | 218f6f25240499ee2f7138332c7b73d76df6c2dd /src/shared/proparser/qmakeevaluator.cpp | |
parent | b03ba2bdb1ca4e96fa8be5da5c53fe48d8393c6f (diff) | |
parent | 28bcc5634c2521d514fdae7dc05585dc20c1bde6 (diff) | |
download | qt-creator-fe74a9a722e50b16b7f3f73ae96fb891f8613c3c.tar.gz |
Merge remote-tracking branch 'origin/2.6'
Conflicts:
qtcreator.pri
qtcreator.qbs
src/plugins/fakevim/fakevimhandler.cpp
src/plugins/qtsupport/baseqtversion.cpp
tests/auto/cplusplus/cxx11/cxx11.pro
tests/auto/cplusplus/cxx11/tst_cxx11.cpp
tests/auto/icheckbuild/icheckbuild.pro
Change-Id: I3c8351ad35617f56d15b788c8a46d8a6f453ef70
Diffstat (limited to 'src/shared/proparser/qmakeevaluator.cpp')
-rw-r--r-- | src/shared/proparser/qmakeevaluator.cpp | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/src/shared/proparser/qmakeevaluator.cpp b/src/shared/proparser/qmakeevaluator.cpp index 663be73f58..2a44bdd441 100644 --- a/src/shared/proparser/qmakeevaluator.cpp +++ b/src/shared/proparser/qmakeevaluator.cpp @@ -199,7 +199,6 @@ void QMakeEvaluator::initFrom(const QMakeEvaluator &other) m_valuemapStack = other.m_valuemapStack; m_valuemapInited = true; m_qmakespec = other.m_qmakespec; - m_qmakespecFull = other.m_qmakespecFull; m_qmakespecName = other.m_qmakespecName; m_mkspecPaths = other.m_mkspecPaths; m_featureRoots = other.m_featureRoots; @@ -1116,17 +1115,26 @@ bool QMakeEvaluator::loadSpecInternal() evalError(fL1S("Could not read qmake configuration file %1.").arg(spec)); return false; } -#ifdef Q_OS_UNIX - m_qmakespecFull = QFileInfo(m_qmakespec).canonicalFilePath(); -#else +#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 // 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")); - m_qmakespecFull = orig_spec.isEmpty() ? m_qmakespec : orig_spec.toQString(); + if (!orig_spec.isEmpty()) + m_qmakespec = orig_spec.toQString(); +# endif #endif - valuesRef(ProKey("QMAKESPEC")) << ProString(m_qmakespecFull); - m_qmakespecName = IoUtils::fileName(m_qmakespecFull).toString(); + valuesRef(ProKey("QMAKESPEC")) << ProString(m_qmakespec); + m_qmakespecName = IoUtils::fileName(m_qmakespec).toString(); if (!evaluateFeatureFile(QLatin1String("spec_post.prf"))) return false; // The MinGW and x-build specs may change the separator; $$shell_{path,quote}() need it @@ -1168,7 +1176,12 @@ bool QMakeEvaluator::loadSpec() updateMkspecPaths(); if (qmakespec.isEmpty()) + 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 = m_hostBuild ? QLatin1String("default-host") : QLatin1String("default"); +#endif if (IoUtils::isRelativePath(qmakespec)) { foreach (const QString &root, m_mkspecPaths) { QString mkspec = root + QLatin1Char('/') + qmakespec; @@ -1409,12 +1422,12 @@ void QMakeEvaluator::updateFeaturePaths() foreach (const QString &item, m_qmakepath) feature_bases << (item + mkspecs_concat); - if (!m_qmakespecFull.isEmpty()) { + if (!m_qmakespec.isEmpty()) { // The spec is already platform-dependent, so no subdirs here. - feature_roots << (m_qmakespecFull + features_concat); + feature_roots << (m_qmakespec + features_concat); // Also check directly under the root directory of the mkspecs collection - QDir specdir(m_qmakespecFull); + QDir specdir(m_qmakespec); while (!specdir.isRoot() && specdir.cdUp()) { const QString specpath = specdir.path(); if (specpath.endsWith(mkspecs_concat)) { |