1From 31a126a7e5e08fe1d3ba84639d2121453a71606f Mon Sep 17 00:00:00 2001 2From: Holger Freyther <zecke@selfish.org> 3Date: Wed, 26 Sep 2012 17:22:30 +0200 4Subject: [PATCH] qlibraryinfo: allow to set qt.conf from the outside using the 5 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: Inappropriate [embedded specific] 12 again very OE specific to read everything from environment (reusing the same 13 qmake from sstate and replacing all configured paths in it with qt.conf from 14 environment). 15 16Change-Id: I41595c6ce7514e8f197d0a19a1308c9460037d1b 17Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> 18--- 19 src/corelib/global/qlibraryinfo.cpp | 5 ++++- 20 1 file changed, 4 insertions(+), 1 deletion(-) 21 22diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp 23index 8ceb763491..ea102f788d 100644 24--- a/src/corelib/global/qlibraryinfo.cpp 25+++ b/src/corelib/global/qlibraryinfo.cpp 26@@ -183,7 +183,10 @@ void QLibrarySettings::load() 27 QSettings *QLibraryInfoPrivate::findConfiguration() 28 { 29 #ifdef QT_BUILD_QMAKE 30- QString qtconfig = qmake_libraryInfoFile(); 31+ QByteArray config = getenv("OE_QMAKE_QTCONF_PATH"); 32+ QString qtconfig = QFile::decodeName(config); 33+ if(qtconfig.isEmpty() || !QFile::exists(qtconfig)) 34+ qtconfig = qmake_libraryInfoFile(); 35 if (QFile::exists(qtconfig)) 36 return new QSettings(qtconfig, QSettings::IniFormat); 37 #else 38