summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-09-18 09:32:46 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2012-11-06 14:01:23 +0100
commit7ab1f974195134c229af8c826f141ce58ab64533 (patch)
tree76a624735c3fdf99590e179c5e0c996387a30468
parentd394225d89a48c7bc537f3566960272b1da8471c (diff)
downloadqt-creator-7ab1f974195134c229af8c826f141ce58ab64533.tar.gz
resolve only one level of symlinks, and only for the default specs
otherwise we end up in the source tree, which is counterproductive. Task-number: QTBUG-26869 Change-Id: Id44a94f827dc285c75b9b243c8ef6478e668e3ff Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qttools/29bdcb6008a58203efc62ee58e57d266e60be095, plus creator-specific amend) Reviewed-by: Daniel Teske <daniel.teske@digia.com>
-rw-r--r--src/plugins/qtsupport/baseqtversion.cpp6
-rw-r--r--src/shared/proparser/qmakeevaluator.cpp7
2 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index 1e346e6f5e..f39ebf1215 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -1305,7 +1305,7 @@ Utils::FileName BaseQtVersion::mkspecFromVersionInfo(const QHash<QString, QStrin
if (value.contains("XCODE")) {
// we don't want to generate xcode projects...
// qDebug() << "default mkspec is xcode, falling back to g++";
- mkspecFullPath = baseMkspecDir.appendPath(QLatin1String("macx-g++"));
+ return baseMkspecDir.appendPath(QLatin1String("macx-g++"));
}
}
break;
@@ -1315,7 +1315,9 @@ Utils::FileName BaseQtVersion::mkspecFromVersionInfo(const QHash<QString, QStrin
}
# endif
//resolve mkspec link
- mkspecFullPath = Utils::FileName::fromString(mkspecFullPath.toFileInfo().canonicalFilePath());
+ QString rspec = mkspecFullPath.toFileInfo().readLink();
+ if (!rspec.isEmpty())
+ mkspecFullPath = Utils::FileName::fromUserInput(QDir(baseMkspecDir).absoluteFilePath(rspec));
#endif
return mkspecFullPath;
diff --git a/src/shared/proparser/qmakeevaluator.cpp b/src/shared/proparser/qmakeevaluator.cpp
index f0242f418a..be62a8b45a 100644
--- a/src/shared/proparser/qmakeevaluator.cpp
+++ b/src/shared/proparser/qmakeevaluator.cpp
@@ -1052,7 +1052,12 @@ bool QMakeEvaluator::loadSpecInternal()
return false;
}
#ifdef Q_OS_UNIX
- m_qmakespec = QFileInfo(m_qmakespec).canonicalFilePath();
+ 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