From ad884ab378939e685a3b00af03bb6875d9bdc1d5 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Wed, 26 Sep 2012 17:22:30 +0200 Subject: [PATCH 02/12] 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: Inappropriate [embedded specific] again very OE specific to read everything from environment (reusing the same qmake from sstate and replacing all configured paths in it with qt.conf from environment). Signed-off-by: Martin Jansa --- src/corelib/global/qlibraryinfo.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 6d25325..80e0f30 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -153,7 +153,10 @@ QLibrarySettings::QLibrarySettings() QSettings *QLibraryInfoPrivate::findConfiguration() { - QString qtconfig = QStringLiteral(":/qt/etc/qt.conf"); + QByteArray config = getenv("QT_CONF_PATH"); + QString qtconfig = QFile::decodeName(config); + if(!QFile::exists(qtconfig)) + qtconfig = QStringLiteral(":/qt/etc/qt.conf"); #ifdef QT_BOOTSTRAPPED if(!QFile::exists(qtconfig)) qtconfig = qt_libraryInfoFile(); -- 2.0.0