diff options
author | David Faure <faure@kde.org> | 2012-07-21 08:54:08 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-22 14:51:19 (GMT) |
commit | d1ff987835c459513dbce0c48fc40c6cdcbe1134 (patch) | |
tree | cb3b669054fa7a7cc147b05521eba7d8282427c8 /src/corelib/io | |
parent | 8a87476673662be0f9fc5a0f0485b5e6fb951a5a (diff) | |
download | Qt-d1ff987835c459513dbce0c48fc40c6cdcbe1134.zip Qt-d1ff987835c459513dbce0c48fc40c6cdcbe1134.tar.gz Qt-d1ff987835c459513dbce0c48fc40c6cdcbe1134.tar.bz2 |
QUrl: add missing detach() in setEncodedUrl, spotted by Marc Mutz.
Reported-by: Marc Mutz <marc.mutz@kdab.com>
Change-Id: If53957bafa9c077981c8ec5107313bc25469b579
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qurl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index de5b0a3..e6ad1ea 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -4400,8 +4400,8 @@ static inline char toHex(quint8 c) void QUrl::setEncodedUrl(const QByteArray &encodedUrl, ParsingMode parsingMode) { QByteArray tmp = encodedUrl; - if (!d) d = new QUrlPrivate; - else d->clear(); + detach(); + d->clear(); if ((d->parsingMode = parsingMode) == TolerantMode) { // Replace stray % with %25 QByteArray copy = tmp; |