From 58507f6bdf32262dcb56d4d2c0c8c8a0812967b7 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 7 Jun 2013 18:58:11 -0700 Subject: QUrl stringprep: avoid recalculating the surrogates we already know (cherry-picked from qtbase commit 53388cd8e0451ea375ed250b59f9e89319fb3e1c) Change-Id: Icac4e81fff6f7f7fa4f46ec2a08105f8d3d2b403 Reviewed-by: Konstantin Ritt --- src/corelib/io/qurl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 3dc9568..af0dfa7 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3012,8 +3012,8 @@ void qt_nameprep(QString *source, int from) if (uc <= 0xFFFF) { *out++ = *in; } else { - *out++ = QChar::highSurrogate(uc); - *out++ = QChar::lowSurrogate(uc); + *out++ = in[-1]; + *out++ = in[0]; } } } -- cgit v0.12