summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-11 01:01:14 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-11 01:01:15 +0200
commit50d41f14eecc32e374ca34f76d45d65684a640c8 (patch)
tree1c38a164c1604139103aa69d88e8d184112f1b11 /src/corelib/global
parente1fd6074935cd0be0df14d89eb0244fcbd1677cf (diff)
parent5e421957de544224511c4823a4829ed2a34317d0 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qlibraryinfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 434b657df3..3e56e258b9 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -727,6 +727,11 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
#ifndef QT_BUILD_QMAKE_BOOTSTRAP
if (!fromConf) {
+ // "volatile" here is a hack to prevent compilers from doing a
+ // compile-time strlen() on "path". The issue is that Qt installers
+ // will binary-patch the Qt installation paths -- in such scenarios, Qt
+ // will be built with a dummy path, thus the compile-time result of
+ // strlen is meaningless.
const char * volatile path = 0;
if (loc == PrefixPath) {
path = getPrefix(