<commit_before>From b5dac69f4309950b828566002d07662b77e34097 Mon Sep 17 00:00:00 2001
From: <NAME> <<EMAIL>>
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: 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: <NAME> <<EMAIL>>
---
 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 422d08f32c..a59df4f20e 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -172,7 +172,10 @@ void QLibrarySettings::load()
 QSettings *QLibraryInfoPrivate::findConfiguration()
 {
 #ifdef QT_BUILD_QMAKE
-    QString qtconfig = qmake_libraryInfoFile();
+    QByteArray config = getenv("OE_QMAKE_QTCONF_PATH");
+    QString qtconfig = QFile::decodeName(config);
+    if(!QFile::exists(qtconfig))
+        qtconfig = qmake_libraryInfoFile();
     if (QFile::exists(qtconfig))
         return new QSettings(qtconfig, QSettings::IniFormat);
 #else
<commit_msg>qtbase: don't pass empty filename to function<commit_after>From b5dac69f4309950b828566002d07662b77e34097 Mon Sep 17 00:00:00 2001
From: <NAME> <<EMAIL>>
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: 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: <NAME> <<EMAIL>>
---
 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 422d08f32c..a59df4f20e 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -172,7 +172,10 @@ void QLibrarySettings::load()
 QSettings *QLibraryInfoPrivate::findConfiguration()
 {
 #ifdef QT_BUILD_QMAKE
-    QString qtconfig = qmake_libraryInfoFile();
+    QByteArray config = getenv("OE_QMAKE_QTCONF_PATH");
+    QString qtconfig = QFile::decodeName(config);
+    if(qtconfig.isEmpty() || !QFile::exists(qtconfig))
+        qtconfig = qmake_libraryInfoFile();
     if (QFile::exists(qtconfig))
         return new QSettings(qtconfig, QSettings::IniFormat);
 #else

{'fraction_non_alphanumeric': 0.10683760683760683, 'fraction_numerical': 0.060486522024983565, 'mean_word_length': 4.741509433962264, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5940059', 'n_tokens_mistral': 1138, 'n_tokens_neox': 988, 'n_words': 295}