summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qsavefile.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2019-06-20 16:57:50 -0700
committerThiago Macieira <thiago.macieira@intel.com>2019-07-11 11:46:59 -0700
commitd01693733f6c1ebe6b3709f9c1284239ce3b5354 (patch)
tree9def99de116762efe0e5da0d347df25a8cd7b8a9 /src/corelib/io/qsavefile.cpp
parent786c58817187bb18552934c807ba7a7ea845f49e (diff)
QDirIterator: don't require NFD normalization on Darwin for validity
HFS+ filesystems do enforce NFD normalization, so the test worked for those filesystems. But on APFS, the filesystem is normalization- insensitive but preserves it, so our transformation caused valid files to be rejected. This commit also optimizes the solution for all systems too. Instead of converting from 8-bit to UTF-16 then back to 8-bit (allocating memory in both steps), we only convert to UTF-16. And if we detect the locale is UTF-8, then we use the further optimized QUtf8::isValidUtf8 function that doesn't allocate any memory at all (ditto for US-ASCII, the case of someone running with LANG=C). Fixes: QTBUG-76522 Change-Id: Ief874765cd7b43798de3fffd15aa0d81620ad317 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qsavefile.cpp')
0 files changed, 0 insertions, 0 deletions