47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
From 2af433da710aff74445cb5148d369427bdd501de Mon Sep 17 00:00:00 2001
|
|
From: Holger Freyther <zecke@selfish.org>
|
|
Date: Wed, 26 Sep 2012 17:22:30 +0200
|
|
Subject: [PATCH] qlibraryinfo: allow to set qt.conf from the outside using the
|
|
environment
|
|
|
|
Allow to set a qt.conf from the outside using the environment. This allows
|
|
to inject new prefixes and other paths into qmake. This is needed when using
|
|
the same qmake binary to build qt/x11 and qt/embedded
|
|
|
|
Upstream-Status: Pending
|
|
|
|
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
|
---
|
|
src/corelib/global/qlibraryinfo.cpp | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
|
|
index 747fd87..c9f8170 100644
|
|
--- a/src/corelib/global/qlibraryinfo.cpp
|
|
+++ b/src/corelib/global/qlibraryinfo.cpp
|
|
@@ -140,6 +140,10 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
|
|
{
|
|
QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
|
|
#ifdef QT_BOOTSTRAPPED
|
|
+ if (!QFile::exists(qtconfig)) {
|
|
+ QByteArray config = getenv("QT_CONF_PATH");
|
|
+ qtconfig = QFile::decodeName(config);
|
|
+ }
|
|
if(!QFile::exists(qtconfig))
|
|
qtconfig = qt_libraryInfoFile();
|
|
#else
|
|
@@ -164,6 +168,10 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
|
|
}
|
|
}
|
|
#endif
|
|
+ if (!QFile::exists(qtconfig)) {
|
|
+ QByteArray config = getenv("QT_CONF_PATH");
|
|
+ qtconfig = QFile::decodeName(config);
|
|
+ }
|
|
if (QFile::exists(qtconfig))
|
|
return new QSettings(qtconfig, QSettings::IniFormat);
|
|
return 0; //no luck
|
|
--
|
|
1.8.1.5
|
|
|