summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlibraryinfo.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-03-20 11:18:17 +0100
committerMitch Curtis <mitch.curtis@qt.io>2020-03-20 11:28:14 +0100
commit69a5be7ef0475ba748ffbe50017c73e44a23a051 (patch)
treed29043898dba33596e3eb2ee51645b3330a87a88 /src/corelib/global/qlibraryinfo.cpp
parent0359a82e6ef538316e550e7fa7c6dee8db72a225 (diff)
parentfcbbe7ff21a263f7fafb189caff4b662d4da7eda (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Diffstat (limited to 'src/corelib/global/qlibraryinfo.cpp')
-rw-r--r--src/corelib/global/qlibraryinfo.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 835fea0c77..f1d7832e46 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -661,7 +661,7 @@ static QString getHostPrefixFromHostBinDir()
#endif
#ifndef QT_BUILD_QMAKE_BOOTSTRAP
-static const char *getPrefix(
+static QString getPrefix(
#ifdef QT_BUILD_QMAKE
QLibraryInfo::PathGroup group
#endif
@@ -670,15 +670,13 @@ static const char *getPrefix(
#if defined(QT_BUILD_QMAKE)
# if QT_CONFIGURE_CROSSBUILD
if (group == QLibraryInfo::DevicePaths)
- return QT_CONFIGURE_PREFIX_PATH;
+ return QString::fromLocal8Bit(QT_CONFIGURE_PREFIX_PATH);
# endif
- static QByteArray extPrefixPath = getExtPrefixFromHostBinDir().toLatin1();
- return extPrefixPath.constData();
+ return getExtPrefixFromHostBinDir();
#elif QT_CONFIG(relocatable)
- static QByteArray prefixPath = getRelocatablePrefix().toLatin1();
- return prefixPath.constData();
+ return getRelocatablePrefix();
#else
- return QT_CONFIGURE_PREFIX_PATH;
+ return QString::fromLocal8Bit(QT_CONFIGURE_PREFIX_PATH);
#endif
}
#endif // QT_BUILD_QMAKE_BOOTSTRAP
@@ -799,7 +797,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
// strlen is meaningless.
const char * volatile path = nullptr;
if (loc == PrefixPath) {
- path = getPrefix(
+ ret = getPrefix(
#ifdef QT_BUILD_QMAKE
group
#endif