summaryrefslogtreecommitdiff
path: root/debian/patches/0257-qurl-validate-speedup.diff
blob: eefd01fdc585b632d2274a075be1099a65ab6f0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
qt-bugs@ issue : N234179
Trolltech task ID : none
bugs.kde.org number : 174144
applied: no
author: David Faure <faure@kde.org> (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.

--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -3440,6 +3440,8 @@ void QUrlPrivate::validate() const
     that->encodedOriginal = that->toEncoded(); // may detach
     parse(ParseOnly);
 
+    QURL_SETFLAG(that->stateFlags, Validated);
+
     if (!isValid)
         return;