summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl.cpp
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2011-07-08 18:28:09 +0400
committerQt by Nokia <qt-info@nokia.com>2011-07-13 13:31:42 +0200
commitebfd24a20b1acdced5fe032eedb2737efdc6eb92 (patch)
treeff93db5094ad4d405f209acf4cd32386dcbc9667 /src/corelib/io/qurl.cpp
parent46e29853798371631a94fbbb11d265d0dbd7f655 (diff)
make QChar::Unicode_Unassigned a constantly big value
this makes the version based checks a bit simpler (and thus faster) Change-Id: I975c6d043d238a5c16a4b13f8379e87fbade23cc Reviewed-on: http://codereview.qt.nokia.com/1586 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/io/qurl.cpp')
-rw-r--r--src/corelib/io/qurl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index b948a43080..ef58e90dba 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -2973,8 +2973,7 @@ void qt_nameprep(QString *source, int from)
}
}
if (!isUnassignedAllowed) {
- QChar::UnicodeVersion version = QChar::unicodeVersion(uc);
- if (version == QChar::Unicode_Unassigned || version > QChar::Unicode_3_2) {
+ if (QChar::unicodeVersion(uc) > QChar::Unicode_3_2) {
source->resize(from); // not allowed, clear the label
return;
}