Go to file
Thiago Macieira 70e6e9fe59 Filesystem: avoid crashes on exit in case the locale codec is null
On exit, QLocale::codecForLocale() can return null as the codec may have
already been destroyed. In that case, pretend that Latin1 was the
locale, so any file name is acceptable. This matches QString:

    QTextCodec *codec = QTextCodec::codecForLocale();
    if (codec)
        return codec->toUnicode(str, size);
 #endif // textcodec
    return fromLatin1(str, size);

Note that if we're wrong and the locale was *not* Latin1, files that you
had a name to may not be encoded or decoded the same way.

Fixes: QTBUG-78446
Change-Id: Iece6e011237e4ab284ecfffd15c54077728a17ca
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-24 18:24:00 -07:00
bin syncqt: Fix module header install target creation 2019-07-11 09:50:18 +02:00
config.tests Merge remote-tracking branch 'origin/5.12' into 5.13 2019-08-12 13:23:11 +02:00
dist Merge remote-tracking branch 'origin/5.12' into 5.13 2019-09-08 11:33:28 +02:00
doc Doc: Add external links to new topics in Qt Creator Manual 2019-09-05 17:36:05 +02:00
examples Merge remote-tracking branch 'origin/5.12' into 5.13 2019-07-12 12:23:29 +02:00
lib
mkspecs Ignore non-existent .ui file dependencies 2019-09-18 08:24:46 +02:00
qmake qmake: Replace WinRT with UWP in the qmake Manual 2019-09-20 09:44:00 +02:00
src Filesystem: avoid crashes on exit in case the locale codec is null 2019-09-24 18:24:00 -07:00
tests Ensure that QFont::fromString() doesn't parse empty font specifications 2019-09-24 14:38:40 +02:00
util Merge remote-tracking branch 'origin/5.12' into 5.13 2019-05-09 13:06:11 +00:00
.gitattributes
.gitignore Remove support for qml1 plugins and modules 2018-11-15 19:52:13 +00:00
.qmake.conf Bump version 2019-07-01 16:34:58 +02:00
.tag
config_help.txt Merge remote-tracking branch 'qt/5.12' into 5.13 2019-08-20 10:41:56 +00:00
configure configure: Treat win32-clang-g++ the same as win32-g++ 2018-10-10 04:10:40 +00:00
configure.bat Configure: simplify logic 2019-03-14 12:13:58 +00:00
configure.json Merge remote-tracking branch 'origin/5.12' into 5.13 2019-07-12 12:23:29 +02:00
configure.pri Merge remote-tracking branch 'origin/5.12' into 5.13 2019-08-31 01:00:48 +02:00
header.BSD Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.FDL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL-EXCEPT Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3-COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-NOGPL2 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-ONLY Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.MIT qsimd: add support for new x86 CPU features 2018-05-05 06:20:07 +00:00
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT-4.0 Replace commercial preview license with Qt License Agreement 4.0 2018-06-21 11:39:15 +00:00
qtbase.pro nuke configure -host-option 2016-12-13 18:55:59 +00:00
sync.profile platformsupport/input: add xkbcommon utilities lib 2019-03-01 14:31:28 +00:00