QLibrary/Unix: fix mojibake of dlerror()
Amends a6a56814702612d8981f594a6158d70a7928cb99 where I replaced a function that correctly did QString::fromLocal8Bit() with QLatin1StringView. Pick-to: 6.7 Change-Id: Ic0adfa808d28487a8303fffd17d9ec0817eda3e8 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 0a1a8355f313ac951e3e615f47aca40f421fc4bc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
63aece5ae7
commit
e3b0d2f93c
@ -236,8 +236,8 @@ bool QLibraryPrivate::load_sys()
|
|||||||
|
|
||||||
locker.relock();
|
locker.relock();
|
||||||
if (!hnd) {
|
if (!hnd) {
|
||||||
errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName,
|
errorString = QLibrary::tr("Cannot load library %1: %2")
|
||||||
QLatin1StringView(dlerror()));
|
.arg(fileName, QString::fromLocal8Bit(dlerror()));
|
||||||
}
|
}
|
||||||
if (hnd) {
|
if (hnd) {
|
||||||
qualifiedFileName = attempt;
|
qualifiedFileName = attempt;
|
||||||
@ -262,8 +262,8 @@ bool QLibraryPrivate::unload_sys()
|
|||||||
if (!qstrcmp(error, "Shared objects still referenced")) // On QNX that's only "informative"
|
if (!qstrcmp(error, "Shared objects still referenced")) // On QNX that's only "informative"
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
errorString = QLibrary::tr("Cannot unload library %1: %2").arg(fileName,
|
errorString = QLibrary::tr("Cannot unload library %1: %2")
|
||||||
QLatin1StringView(error));
|
.arg(fileName, QString::fromLocal8Bit(error));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
errorString.clear();
|
errorString.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user