aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qtsupport/baseqtversion.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-01-23 15:58:55 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-01-24 14:01:31 +0000
commit2cb7c81e620d224d386860a637dc889acb15435e (patch)
tree4b4b92a1d318f71101566edee3acd72cbe424f07 /src/plugins/qtsupport/baseqtversion.cpp
parent8a69c254757eab7852443b5e4bd5eafb68908d3d (diff)
de-duplicate qmake property parsing code
Change-Id: I7555de5c72a9250b31e20fc60e39680d19882fcb Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qtsupport/baseqtversion.cpp')
-rw-r--r--src/plugins/qtsupport/baseqtversion.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index a5218136a7..473cdfde06 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -1447,33 +1447,8 @@ bool BaseQtVersion::queryQMakeVariables(const FileName &binary, const Environmen
if (output.isNull())
return false;
- QTextStream stream(&output);
- while (!stream.atEnd()) {
- const QString line = stream.readLine();
- const int index = line.indexOf(QLatin1Char(':'));
- if (index != -1) {
- QString name = line.left(index);
- ProString value(QDir::fromNativeSeparators(line.mid(index+1)));
- if (value.isNull())
- value = ProString(""); // Make sure it is not null, to discern from missing keys
- versionInfo->insert(ProKey(name), value);
- if (name.startsWith(QLatin1String("QT_")) && !name.contains(QLatin1Char('/'))) {
- if (name.startsWith(QLatin1String("QT_INSTALL_"))) {
- versionInfo->insert(ProKey(name + QLatin1String("/raw")), value);
- versionInfo->insert(ProKey(name + QLatin1String("/get")), value);
- if (name == QLatin1String("QT_INSTALL_PREFIX")
- || name == QLatin1String("QT_INSTALL_DATA")
- || name == QLatin1String("QT_INSTALL_BINS")) {
- name.replace(3, 7, QLatin1String("HOST"));
- versionInfo->insert(ProKey(name), value);
- versionInfo->insert(ProKey(name + QLatin1String("/get")), value);
- }
- } else if (name.startsWith(QLatin1String("QT_HOST_"))) {
- versionInfo->insert(ProKey(name + QLatin1String("/get")), value);
- }
- }
- }
- }
+ QMakeGlobals::parseProperties(output, *versionInfo);
+
return true;
}