summaryrefslogtreecommitdiff
path: root/debian/patches/0257-qurl-validate-speedup.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0257-qurl-validate-speedup.diff')
-rw-r--r--debian/patches/0257-qurl-validate-speedup.diff21
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/patches/0257-qurl-validate-speedup.diff b/debian/patches/0257-qurl-validate-speedup.diff
new file mode 100644
index 0000000..eefd01f
--- /dev/null
+++ b/debian/patches/0257-qurl-validate-speedup.diff
@@ -0,0 +1,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;
+