diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2010-05-20 08:46:07 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-05-20 08:46:07 (GMT) |
commit | 2a00c5582c23e5e7aee858725d27da4d725d03cf (patch) | |
tree | a4aee31af4adbaff4de3670e4cf84709c8607b98 /src/corelib/tools/qstring.cpp | |
parent | c98ccc13252aa625f552ae2f05f47e7e5f475aaa (diff) | |
download | Qt-2a00c5582c23e5e7aee858725d27da4d725d03cf.zip Qt-2a00c5582c23e5e7aee858725d27da4d725d03cf.tar.gz Qt-2a00c5582c23e5e7aee858725d27da4d725d03cf.tar.bz2 |
prevent fake normalization
if normalization was requested for QChar::Unicode_Unassigned version;
treat it like latest supported version instead
Merge-request: 2393
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
-rw-r--r-- | src/corelib/tools/qstring.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 9e80938..6acbcec 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -6195,8 +6195,10 @@ void qt_string_normalize(QString *data, QString::NormalizationForm mode, QChar:: if (simple) return; - QString &s = *data; - if (version != UNICODE_DATA_VERSION) { + if (version == QChar::Unicode_Unassigned) { + version = UNICODE_DATA_VERSION; + } else if (version != UNICODE_DATA_VERSION) { + QString &s = *data; for (int i = 0; i < NumNormalizationCorrections; ++i) { const NormalizationCorrection &n = uc_normalization_corrections[i]; if (n.version > version) { |