diff options
Diffstat (limited to 'recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch')
-rw-r--r-- | recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch b/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch new file mode 100644 index 00000000..f2a6efca --- /dev/null +++ b/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 29812cee9589dedd10a94b66ed5279549ed62f36 Mon Sep 17 00:00:00 2001 | ||
2 | From: Holger Freyther <zecke@selfish.org> | ||
3 | Date: Wed, 26 Sep 2012 17:22:30 +0200 | ||
4 | Subject: [PATCH 2/6] qlibraryinfo: allow to set qt.conf from the outside using | ||
5 | the environment | ||
6 | |||
7 | Allow to set a qt.conf from the outside using the environment. This allows | ||
8 | to inject new prefixes and other paths into qmake. This is needed when using | ||
9 | the same qmake binary to build qt/x11 and qt/embedded | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-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 | |||
18 | diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp | ||
19 | index a8dc086..c16dfcb 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 | -- | ||
45 | 1.8.2.1 | ||
46 | |||