fix QMAKE_{,X}SPEC when a qt.conf containing [Paths] is present
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>
Wed, 7 Nov 2012 10:55:17 +0000 (11:55 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 8 Nov 2012 15:59:50 +0000 (16:59 +0100)
unlike for the paths which fall back to defaults based on the Prefix,
the specs must fall back to the values from qconfig.cpp.

Change-Id: I5f110621921cf278f2c3938a4ec5eb30a78c8502
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
src/corelib/global/qlibraryinfo.cpp

index be608a4..25f827a 100644 (file)
@@ -358,9 +358,13 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
             ret = config->value(key, defaultValue).toString();
 
 #ifdef QT_BOOTSTRAPPED
-            if (ret.isEmpty() && loc == HostPrefixPath)
-                ret = config->value(QLatin1String(qtConfEntries[PrefixPath].key),
-                                    QLatin1String(qtConfEntries[PrefixPath].value)).toString();
+            if (ret.isEmpty()) {
+                if (loc == HostPrefixPath)
+                    ret = config->value(QLatin1String(qtConfEntries[PrefixPath].key),
+                                        QLatin1String(qtConfEntries[PrefixPath].value)).toString();
+                else if (loc == TargetSpecPath || loc == HostSpecPath)
+                    ret = QString::fromLocal8Bit(qt_configure_prefix_path_strs[loc] + 12);
+            }
 #endif
 
             // expand environment variables in the form $(ENVVAR)