diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-17 07:56:30 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-17 08:22:55 +0200 |
commit | 4c5e405e691f707f2765b5f920c28213a36d22e5 (patch) | |
tree | 48000f220fc2c4365b276146e3d08a05c3a90312 /sources/pyside2/libpyside/pyside.cpp | |
parent | 53181fb95d3884cc067d005f37accd92d128bccc (diff) | |
parent | 38814354ff6a30258b79947304fd3a6be4dc7089 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I8aa48d07067c45c888c73af87314f6a88c2a6e14
Diffstat (limited to 'sources/pyside2/libpyside/pyside.cpp')
-rw-r--r-- | sources/pyside2/libpyside/pyside.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sources/pyside2/libpyside/pyside.cpp b/sources/pyside2/libpyside/pyside.cpp index 7c8f99b93..2404788d3 100644 --- a/sources/pyside2/libpyside/pyside.cpp +++ b/sources/pyside2/libpyside/pyside.cpp @@ -584,16 +584,22 @@ bool registerInternalQtConf() #ifdef PYSIDE_QT_CONF_PREFIX setupPrefix = QStringLiteral(PYSIDE_QT_CONF_PREFIX); #endif - QString prefixPath = pysideDir.absoluteFilePath(setupPrefix); + const QString prefixPathStr = pysideDir.absoluteFilePath(setupPrefix); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + const QByteArray prefixPath = prefixPathStr.toLocal8Bit(); +#else + // PYSIDE-972, QSettings used by QtCore uses Latin1 + const QByteArray prefixPath = prefixPathStr.toLatin1(); +#endif // rccData needs to be static, otherwise when it goes out of scope, the Qt resource system // will point to invalid memory. - static QByteArray rccData = QByteArray("[Paths]\nPrefix = ") + prefixPath.toLocal8Bit() + static QByteArray rccData = QByteArrayLiteral("[Paths]\nPrefix = ") + prefixPath #ifdef Q_OS_WIN // LibraryExecutables needs to point to Prefix instead of ./bin because we don't // currently conform to the Qt default directory layout on Windows. This is necessary // for QtWebEngineCore to find the location of QtWebEngineProcess.exe. - + QByteArray("\nLibraryExecutables = ") + prefixPath.toLocal8Bit() + + QByteArray("\nLibraryExecutables = ") + prefixPath #endif ; rccData.append('\n'); |