summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2012-07-14 00:53:38 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-26 11:08:42 +0200
commitac2b452616796c9dd9c0f0bb63dccbefeb8bacbc (patch)
tree557031e88e9d984ed9a8a120f7c35ee9b6a3deec /src/corelib
parent2b69159fd899e87bb8b5ddcb1a9350a1da984fb1 (diff)
QUrl: port thread-safety autotest from Qt4.
This detected the same missing detach()s in QUrl::resolve. Everything else works, no need for a mutex in Qt5's QUrl. Change-Id: I0da51b7b0c6b810d314a26d4b638383cd17de12b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qurl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index bda8e9bf23..81a8462657 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -2743,9 +2743,11 @@ QUrl QUrl::resolved(const QUrl &relative) const
// be non strict and allow scheme in relative url
if (!relative.d->scheme.isEmpty() && relative.d->scheme != d->scheme) {
t = relative;
+ t.detach();
} else {
if (relative.d->hasAuthority()) {
t = relative;
+ t.detach();
} else {
t.d = new QUrlPrivate;