summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase-5.0.2/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-qt/qt5/qtbase-5.0.2/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch')
-rw-r--r--recipes-qt/qt5/qtbase-5.0.2/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase-5.0.2/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch b/recipes-qt/qt5/qtbase-5.0.2/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
new file mode 100644
index 00000000..5bcc22e7
--- /dev/null
+++ b/recipes-qt/qt5/qtbase-5.0.2/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
@@ -0,0 +1,46 @@
1From 41257668e0cb03056d79b2917d54a6e01bf2ed36 Mon Sep 17 00:00:00 2001
2From: Holger Freyther <zecke@selfish.org>
3Date: Wed, 26 Sep 2012 17:22:30 +0200
4Subject: [PATCH 2/6] qlibraryinfo: allow to set qt.conf from the outside using
5 the environment
6
7Allow to set a qt.conf from the outside using the environment. This allows
8to inject new prefixes and other paths into qmake. This is needed when using
9the same qmake binary to build qt/x11 and qt/embedded
10
11Upstream-Status: Pending
12
13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
14---
15 src/corelib/global/qlibraryinfo.cpp | 7 ++++++-
16 1 file changed, 6 insertions(+), 1 deletion(-)
17
18diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
19index 5fb9640..acd11f5 100644
20--- a/src/corelib/global/qlibraryinfo.cpp
21+++ b/src/corelib/global/qlibraryinfo.cpp
22@@ -138,7 +138,10 @@ QLibrarySettings::QLibrarySettings()
23
24 QSettings *QLibraryInfoPrivate::findConfiguration()
25 {
26- QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
27+ QByteArray config = getenv("QT_CONF_PATH");
28+ QString qtconfig = QFile::decodeName(config);
29+ if(!QFile::exists(qtconfig))
30+ qtconfig = QStringLiteral(":/qt/etc/qt.conf");
31 #ifdef QT_BOOTSTRAPPED
32 if(!QFile::exists(qtconfig))
33 qtconfig = qt_libraryInfoFile();
34@@ -165,7 +168,9 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
35 }
36 #endif
37 if (QFile::exists(qtconfig))
38+ printf("Using qt.conf from: %s\n", qtconfig.toLatin1().data());
39 return new QSettings(qtconfig, QSettings::IniFormat);
40+ printf("qt.conf wasn't found!!\n");
41 return 0; //no luck
42 }
43
44--
451.8.2.1
46