summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-11-18 13:23:03 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-11-18 14:42:58 (GMT)
commitbc09d5b11cd45e975ec745b508c703b75b019a4e (patch)
tree70deb85b696c64ad8b2e487deb5e9ae55a06a310 /src/corelib/global
parentdfd5ee41532b55ef6aaa5fb7ed3b586fbac80fce (diff)
downloadQt-bc09d5b11cd45e975ec745b508c703b75b019a4e.zip
Qt-bc09d5b11cd45e975ec745b508c703b75b019a4e.tar.gz
Qt-bc09d5b11cd45e975ec745b508c703b75b019a4e.tar.bz2
Resolve EPOCROOT in qt.conf using same logic as in .pro
Previously it was only possible to use EPOCROOT in qt.conf via env variable, while qmake & configure could resolve it also via devices.xml. Changed qt.conf parsing to support $${EPOCROOT} tag and use same resolving logic as qmake & configure. Task-number: QTBUG-15393 Reviewed-by: axis
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/global.pri2
-rw-r--r--src/corelib/global/qlibraryinfo.cpp12
2 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index 4800716..86800ef 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -27,3 +27,5 @@ linux*:!static:!linux-armcc:!linux-gcce {
# Compensate for lack of platform defines in Symbian3 and Symbian4
symbian: DEFINES += SYMBIAN_VERSION_$$upper($$replace(SYMBIAN_VERSION,\\.,_))
+
+include(../../../tools/shared/symbian/epocroot.pri)
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 957abbf..acacf7c 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -62,6 +62,10 @@ QT_END_NAMESPACE
# include "private/qcore_mac_p.h"
#endif
+#ifdef QLIBRARYINFO_EPOCROOT
+# include "symbian/epocroot.h"
+#endif
+
#include "qconfig.cpp"
QT_BEGIN_NAMESPACE
@@ -433,6 +437,14 @@ QLibraryInfo::location(LibraryLocation loc)
QString::fromLocal8Bit(qgetenv(ret.mid(rep + 2,
reg_var.matchedLength() - 3).toLatin1().constData()).constData()));
}
+
+#ifdef QLIBRARYINFO_EPOCROOT
+ // $${EPOCROOT} is a special case, resolve it similarly to qmake.
+ QRegExp epocrootMatcher(QLatin1String("\\$\\$\\{EPOCROOT\\}"));
+ if ((rep = epocrootMatcher.indexIn(ret)) != -1)
+ ret.replace(rep, epocrootMatcher.matchedLength(), epocRoot());
+#endif
+
config->endGroup();
}
}