File 0257-qurl-validate-speedup.diff of Package libqt4

qt-bugs@ issue : N234179
Trolltech task ID : none number : 174144
applied: no
author: David Faure <> (and Qt Software, independently)

QUrl is supposed to have flags for parsing and validating a given URL only once.
However it only sets the Validated flag on error, not after successful validation.
So a valid url will be validated over and over again, every time e.g. port() or isValid() is called.

--- src/corelib/io/qurl.cpp
+++ src/corelib/io/qurl.cpp
@@ -3414,6 +3414,8 @@ void QUrlPrivate::validate() const
     that->encodedOriginal = that->toEncoded(); // may detach
+    QURL_SETFLAG(that->stateFlags, Validated);
     if (!isValid)
openSUSE Build Service is sponsored by