summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.cpp
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2010-05-20 08:46:07 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-05-20 08:46:07 (GMT)
commit2a00c5582c23e5e7aee858725d27da4d725d03cf (patch)
treea4aee31af4adbaff4de3670e4cf84709c8607b98 /src/corelib/tools/qstring.cpp
parentc98ccc13252aa625f552ae2f05f47e7e5f475aaa (diff)
downloadQt-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.cpp6
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) {