From 68fae07d80b748af6abcfa05ec66341842a210b9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 3 Dec 2014 10:13:41 +0100 Subject: [PATCH] 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 --- tools/configure/configureapp.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index a1d06997862..9b0193437fe 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");