summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2014-12-03 10:13:41 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-02-05 14:26:39 +0000
commit68fae07d80b748af6abcfa05ec66341842a210b9 (patch)
treed97d5adad4a8c5a6cb25706688fd38670d1149e1 /tools
parent4b557751e873e0c6f39b1ba002cadfb32fdf3688 (diff)
simplify mkspec determination when writing qconfig.cpp
we don't actually support qualified specs anyway - all tests assume that they can use startsWith() on the spec name. Change-Id: I9dc8688858d4798c3a18c34757318dcd7fd47c57 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index a1d0699786..9b0193437f 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -3867,11 +3867,6 @@ void Configure::generateHeaders()
}
}
-static QString stripPrefix(const QString &str, const QString &pfx)
-{
- return str.startsWith(pfx) ? str.mid(pfx.length()) : str;
-}
-
void Configure::substPrefix(QString *path)
{
QString spfx = dictionary["QT_SYSROOT_PREFIX"];
@@ -3881,6 +3876,9 @@ void Configure::substPrefix(QString *path)
void Configure::generateQConfigCpp()
{
+ QString hostSpec = dictionary["QMAKESPEC"];
+ QString targSpec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : hostSpec;
+
// if QT_INSTALL_* have not been specified on commandline, define them now from QT_INSTALL_PREFIX
// if prefix is empty (WINCE), make all of them empty, if they aren't set
bool qipempty = false;
@@ -3963,10 +3961,6 @@ void Configure::generateQConfigCpp()
if (dictionary["QT_HOST_DATA"].isEmpty())
dictionary["QT_HOST_DATA"] = haveHpx ? dictionary["QT_HOST_PREFIX"] : dictionary["QT_INSTALL_ARCHDATA"];
- QString specPfx = dictionary["QT_HOST_DATA"] + "/mkspecs/";
- QString hostSpec = stripPrefix(dictionary["QMAKESPEC"], specPfx);
- QString targSpec = dictionary.contains("XQMAKESPEC") ? stripPrefix(dictionary["XQMAKESPEC"], specPfx) : hostSpec;
-
// Generate the new qconfig.cpp file
{
FileWriter tmpStream(buildPath + "/src/corelib/global/qconfig.cpp");