simplify the qt4 fallback in the external property parsing

only qmakes from qt4 don't have QT_HOST_* properties. and as they don't
have _any_ of them, the fallback can be simplified.

Change-Id: Id2ccbc7c01a56b894841980b0bc45bd84d160c54
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Oswald Buddenhagen
2017-01-23 19:23:02 +01:00
parent 2cb7c81e62
commit 89868ee2b9

View File

@@ -353,20 +353,20 @@ void QMakeGlobals::parseProperties(const QByteArray &data, QHash<ProKey, ProStri
}
if (name.startsWith(QLatin1String("QT_INSTALL_"))) {
if (plain) {
if (name == QLatin1String("QT_INSTALL_PREFIX")
|| name == QLatin1String("QT_INSTALL_DATA")
|| name == QLatin1String("QT_INSTALL_BINS")) {
// Qt4 fallback
QString hname = name;
hname.replace(3, 7, QLatin1String("HOST"));
properties.insert(ProKey(hname), value);
properties.insert(ProKey(hname + QLatin1String("/get")), value);
properties.insert(ProKey(hname + QLatin1String("/src")), value);
}
properties.insert(ProKey(name + QLatin1String("/raw")), value);
properties.insert(ProKey(name + QLatin1String("/get")), value);
}
properties.insert(ProKey(name + QLatin1String("/src")), value);
if (name == QLatin1String("QT_INSTALL_PREFIX")
|| name == QLatin1String("QT_INSTALL_DATA")
|| name == QLatin1String("QT_INSTALL_BINS")) {
name.replace(3, 7, QLatin1String("HOST"));
if (plain) {
properties.insert(ProKey(name), value);
properties.insert(ProKey(name + QLatin1String("/get")), value);
}
properties.insert(ProKey(name + QLatin1String("/src")), value);
}
} else if (name.startsWith(QLatin1String("QT_HOST_"))) {
if (plain)
properties.insert(ProKey(name + QLatin1String("/get")), value);