diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-01-10 22:16:19 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-13 14:17:48 +0000 |
commit | a3f639017d9077d22becbc6ac583c922959287e5 (patch) | |
tree | cabba8af7b33d9d66315afc480ffeffb91d665b5 /qmake | |
parent | 4f1b14afe674998da5333773b0869d999cdc475f (diff) |
Fix wrong QT_HOST_* values when qt.conf is present
When a qt.conf was present, QT_HOST_* variables got a wrong default
value. For example, QT_HOST_BINS would end with /bin/bin.
We must not provide the defaults via QSettings::value(_, defaultValue).
The assignment of the default value is done in
QMakeLibraryInfo::rawLocation() separately after retrieving the value.
This amends commit 04ec14105ec41a67fe4d53a1962c9d68c5fd8715.
Fixes: QTBUG-99656
Change-Id: I43431664e93ab40417a5432b03e7eb38ae21bad8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 9d15854138b72be25f4584144eee8f4c0bf8117a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/qmakelibraryinfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qmake/qmakelibraryinfo.cpp b/qmake/qmakelibraryinfo.cpp index 59a4e6eb59..45c74c25ad 100644 --- a/qmake/qmakelibraryinfo.cpp +++ b/qmake/qmakelibraryinfo.cpp @@ -223,11 +223,11 @@ QString QMakeLibraryInfo::rawLocation(int loc, QMakeLibraryInfo::PathGroup group : "Paths")); if (locinfo.fallbackKey.isNull()) { - ret = config->value(locinfo.key, locinfo.defaultValue).toString(); + ret = config->value(locinfo.key).toString(); } else { QVariant v = config->value(locinfo.key); if (!v.isValid()) - v = config->value(locinfo.fallbackKey, locinfo.defaultValue); + v = config->value(locinfo.fallbackKey); ret = v.toString(); } |