diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2011-09-08 22:05:42 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-30 01:19:59 +0200 |
commit | 1c2144c39fa0069bf496e8f77389a9c2f8a31acf (patch) | |
tree | fb3709b67e9d2f5f76cb9a45c6113b67d686d765 /src/corelib/io/qurlquery.h | |
parent | 1aeb18038661d8da6d37fa278e37e315e35c5c42 (diff) |
Forward the methods dealing with the break down of query to QUrlQuery
Now that QUrlQuery exists, these methods are no longer necessary in
QUrl itself. Manipulation of the items should be done using the new
class.
They are now implemented using a temporary QUrlQuery. This is hardly
efficient but it works.
Change-Id: I34820b3101424593d0715841a2057ac3f74d74f0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/io/qurlquery.h')
-rw-r--r-- | src/corelib/io/qurlquery.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/corelib/io/qurlquery.h b/src/corelib/io/qurlquery.h index e2b28f78e7..3e0baa32bc 100644 --- a/src/corelib/io/qurlquery.h +++ b/src/corelib/io/qurlquery.h @@ -46,6 +46,10 @@ #include <QtCore/qshareddata.h> #include <QtCore/qurl.h> +#if QT_DEPRECATED_SINCE(5,0) +#include <QtCore/qstringlist.h> +#endif + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -110,6 +114,25 @@ public: Q_DECLARE_TYPEINFO(QUrlQuery, Q_MOVABLE_TYPE); Q_DECLARE_SHARED(QUrlQuery) +#if QT_DEPRECATED_SINCE(5,0) +inline void QUrl::setQueryItems(const QList<QPair<QString, QString> > &qry) +{ QUrlQuery q(*this); q.setQueryItems(qry); setQuery(q.query()); } +inline void QUrl::addQueryItem(const QString &key, const QString &value) +{ QUrlQuery q(*this); q.addQueryItem(key, value); setQuery(q.query()); } +inline QList<QPair<QString, QString> > QUrl::queryItems() const +{ return QUrlQuery(*this).queryItems(); } +inline bool QUrl::hasQueryItem(const QString &key) const +{ return QUrlQuery(*this).hasQueryItem(key); } +inline QString QUrl::queryItemValue(const QString &key) const +{ return QUrlQuery(*this).queryItemValue(key); } +inline QStringList QUrl::allQueryItemValues(const QString &key) const +{ return QUrlQuery(*this).allQueryItemValues(key); } +inline void QUrl::removeQueryItem(const QString &key) +{ QUrlQuery q(*this); q.removeQueryItem(key); setQuery(q.query()); } +inline void QUrl::removeAllQueryItems(const QString &key) +{ QUrlQuery q(*this); q.removeAllQueryItems(key); } +#endif + QT_END_NAMESPACE QT_END_HEADER |