diff options
author | David Faure <faure@kde.org> | 2012-05-08 13:17:26 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-09 12:07:33 +0200 |
commit | 677858ad9e54e5bb6333977da10541114c5ca9b9 (patch) | |
tree | 33f302830b9fb15a4ed245e7bb71a264e859fc4e /src | |
parent | 33edd606ae188356e47a23619084b358496cbe70 (diff) |
Fix QUrl::StripTrailingSlash for the case of no path at all.
Change-Id: I1fd0fe4b9b67996732c85c1792415e371e865595
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qurl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 649b3a009c..f975fb4e43 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -2159,7 +2159,7 @@ QString QUrl::toString(FormattingOptions options) const d->appendPath(url, options, QUrlPrivate::FullUrl); // check if we need to remove trailing slashes - if ((options & StripTrailingSlash) && d->path != QLatin1String("/") && url.endsWith(QLatin1Char('/'))) + if ((options & StripTrailingSlash) && !d->path.isEmpty() && d->path != QLatin1String("/") && url.endsWith(QLatin1Char('/'))) url.chop(1); } |