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 04ec14105e
.
Pick-to: 6.3
Fixes: QTBUG-99656
Change-Id: I43431664e93ab40417a5432b03e7eb38ae21bad8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
96269ecc77
commit
9d15854138
@ -223,11 +223,11 @@ QString QMakeLibraryInfo::rawLocation(int loc, QMakeLibraryInfo::PathGroup group
|
|||||||
: "Paths"));
|
: "Paths"));
|
||||||
|
|
||||||
if (locinfo.fallbackKey.isNull()) {
|
if (locinfo.fallbackKey.isNull()) {
|
||||||
ret = config->value(locinfo.key, locinfo.defaultValue).toString();
|
ret = config->value(locinfo.key).toString();
|
||||||
} else {
|
} else {
|
||||||
QVariant v = config->value(locinfo.key);
|
QVariant v = config->value(locinfo.key);
|
||||||
if (!v.isValid())
|
if (!v.isValid())
|
||||||
v = config->value(locinfo.fallbackKey, locinfo.defaultValue);
|
v = config->value(locinfo.fallbackKey);
|
||||||
ret = v.toString();
|
ret = v.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user