diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 878e007fb0..a7650390f9 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -979,7 +979,7 @@ inline bool QUrlPrivate::setScheme(const QString &value, int len, bool doSetErro // validate it: int needsLowercasing = -1; - const ushort *p = reinterpret_cast(value.constData()); + const ushort *p = value.utf16(); for (int i = 0; i < len; ++i) { if (p[i] >= 'a' && p[i] <= 'z') continue;