QUrl: Add an "appendingTo" parameter to QUrl::appendFragment

Will be needed in a future commit.

Change-Id: Ia5f384442d25d277e7582a20d1c37da4303c64c3
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This commit is contained in:
Thiago Macieira 2013-07-01 16:57:36 -07:00 committed by The Qt Project
parent 53bcd63061
commit afe66eb9b4

View File

@ -424,7 +424,7 @@ public:
void appendHost(QString &appendTo, QUrl::FormattingOptions options) const;
void appendPath(QString &appendTo, QUrl::FormattingOptions options, Section appendingTo) const;
void appendQuery(QString &appendTo, QUrl::FormattingOptions options, Section appendingTo) const;
void appendFragment(QString &appendTo, QUrl::FormattingOptions options) const;
void appendFragment(QString &appendTo, QUrl::FormattingOptions options, Section appendingTo) const;
// the "end" parameters are like STL iterators: they point to one past the last valid element
bool setScheme(const QString &value, int len, bool doSetError);
@ -828,7 +828,7 @@ inline void QUrlPrivate::appendPath(QString &appendTo, QUrl::FormattingOptions o
}
}
inline void QUrlPrivate::appendFragment(QString &appendTo, QUrl::FormattingOptions options) const
inline void QUrlPrivate::appendFragment(QString &appendTo, QUrl::FormattingOptions options, Section appendingTo) const
{
appendToUser(appendTo, fragment, options, encodedFragmentActions, decodedFragmentInIsolationActions);
}
@ -2842,7 +2842,7 @@ QString QUrl::fragment(ComponentFormattingOptions options) const
if (!d) return QString();
QString result;
d->appendFragment(result, options);
d->appendFragment(result, options, QUrlPrivate::Fragment);
if (d->hasFragment() && result.isNull())
result.detach();
return result;
@ -3096,7 +3096,7 @@ QString QUrl::toString(FormattingOptions options) const
}
if (!(options & QUrl::RemoveFragment) && d->hasFragment()) {
url += QLatin1Char('#');
d->appendFragment(url, options);
d->appendFragment(url, options, QUrlPrivate::FullUrl);
}
return url;