Commit 074daa41 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

rewrite default spec handling

instead of symlinking (on unix) or creating a forwarding spec (on
windows), just put the default specs into (the bootstrapped)

Change-Id: I595500ef7399f77cb8ec117c4303bc0a2ffe505f
(cherry picked from qttools/0e75115e557b4cf1c737e3e5524f876a6b85a39e)
(cherry picked from qttools/769fa282ac8a4b98698dada6969452363e0eb415)
Reviewed-by: default avatarDaniel Teske <>
parent 7ab1f974
......@@ -1051,20 +1051,23 @@ bool QMakeEvaluator::loadSpecInternal()
evalError(fL1S("Could not read qmake configuration file %1.").arg(spec));
return false;
#ifdef Q_OS_UNIX
// 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"));
if (!orig_spec.isEmpty())
m_qmakespec = orig_spec.toQString();
# endif
valuesRef(ProKey("QMAKESPEC")) << ProString(m_qmakespec);
m_qmakespecName = IoUtils::fileName(m_qmakespec).toString();
......@@ -1108,8 +1111,13 @@ bool QMakeEvaluator::loadSpec()
if (qmakespec.isEmpty())
qmakespec = propertyValue(ProKey(m_hostBuild ? "QMAKE_SPEC" : "QMAKE_XSPEC")).toQString();
// Legacy support for Qt4 qmake in Qt Creator, etc.
if (qmakespec.isEmpty())
qmakespec = m_hostBuild ? QLatin1String("default-host") : QLatin1String("default");
if (IoUtils::isRelativePath(qmakespec)) {
foreach (const QString &root, m_mkspecPaths) {
QString mkspec = root + QLatin1Char('/') + qmakespec;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment