summaryrefslogtreecommitdiff
blob: c3eaa1b6fa7eba18d714780522b067818730e46c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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.

Included in Qt 4.5

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