summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-06-11 16:08:30 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-26 23:55:50 +0200
commit66ef0879099a9c7381a21d80c65bfd499cbae2ce (patch)
tree6ad7c70e570877f77d22387b760311619db03310
parent3a607cbc8a7e2654f4ab69d56794490abb0b1596 (diff)
downloadqttools-66ef0879099a9c7381a21d80c65bfd499cbae2ce.tar.gz
introduce /src qmake property variants
this is for shadow builds during build time, where the respective files are expected in the source dir. Change-Id: I18dcfbdef99e1562a51dacac333642cae8105ebd (cherry picked from qtbase/4531c83376c1a3546305a9fa5203e0a885e8860d) Reviewed-by: Daniel Teske <daniel.teske@digia.com>
-rw-r--r--src/linguist/shared/qmakeglobals.cpp51
1 files changed, 32 insertions, 19 deletions
diff --git a/src/linguist/shared/qmakeglobals.cpp b/src/linguist/shared/qmakeglobals.cpp
index 48c4dfc7c..6f2390fc3 100644
--- a/src/linguist/shared/qmakeglobals.cpp
+++ b/src/linguist/shared/qmakeglobals.cpp
@@ -324,33 +324,46 @@ bool QMakeGlobals::initProperties()
QT_PCLOSE(proc);
}
#endif
- foreach (QByteArray line, data.split('\n'))
- {
- int off = line.indexOf(':');
- if (off < 0) // huh?
- continue;
- if (line.endsWith('\r'))
- line.chop(1);
- QString name = QString::fromLatin1(line.left(off));
- ProString value = ProString(QDir::fromNativeSeparators(
- QString::fromLocal8Bit(line.mid(off + 1))));
- properties.insert(ProKey(name), value);
- if (name.startsWith(QLatin1String("QT_")) && !name.contains(QLatin1Char('/'))) {
- if (name.startsWith(QLatin1String("QT_INSTALL_"))) {
+ foreach (QByteArray line, data.split('\n')) {
+ int off = line.indexOf(':');
+ if (off < 0) // huh?
+ continue;
+ if (line.endsWith('\r'))
+ line.chop(1);
+ QString name = QString::fromLatin1(line.left(off));
+ ProString value = ProString(QDir::fromNativeSeparators(
+ QString::fromLocal8Bit(line.mid(off + 1))));
+ properties.insert(ProKey(name), value);
+ if (name.startsWith(QLatin1String("QT_"))) {
+ bool plain = !name.contains(QLatin1Char('/'));
+ if (!plain) {
+ if (!name.endsWith(QLatin1String("/get")))
+ continue;
+ name.chop(4);
+ }
+ if (name.startsWith(QLatin1String("QT_INSTALL_"))) {
+ if (plain) {
properties.insert(ProKey(name + QLatin1String("/raw")), value);
properties.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"));
+ }
+ 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);
}
- } else if (name.startsWith(QLatin1String("QT_HOST_"))) {
- 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);
+ properties.insert(ProKey(name + QLatin1String("/src")), value);
}
}
+ }
return true;
}
#else