diff options
Diffstat (limited to 'src')
-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; |