From 1c2144c39fa0069bf496e8f77389a9c2f8a31acf Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 8 Sep 2011 22:05:42 +0200 Subject: 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 --- src/corelib/io/qurl.h | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) (limited to 'src/corelib/io/qurl.h') diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h index 1600cb8fa3..55cdcbe2d0 100644 --- a/src/corelib/io/qurl.h +++ b/src/corelib/io/qurl.h @@ -44,7 +44,6 @@ #include #include -#include #include #include @@ -156,31 +155,8 @@ public: QByteArray encodedPath() const; bool hasQuery() const; - - void setEncodedQuery(const QByteArray &query); QByteArray encodedQuery() const; - - void setQueryDelimiters(char valueDelimiter, char pairDelimiter); - char queryValueDelimiter() const; - char queryPairDelimiter() const; - - void setQueryItems(const QList > &query); - void addQueryItem(const QString &key, const QString &value); - QList > queryItems() const; - bool hasQueryItem(const QString &key) const; - QString queryItemValue(const QString &key) const; - QStringList allQueryItemValues(const QString &key) const; - void removeQueryItem(const QString &key); - void removeAllQueryItems(const QString &key); - - void setEncodedQueryItems(const QList > &query); - void addEncodedQueryItem(const QByteArray &key, const QByteArray &value); - QList > encodedQueryItems() const; - bool hasEncodedQueryItem(const QByteArray &key) const; - QByteArray encodedQueryItemValue(const QByteArray &key) const; - QList allEncodedQueryItemValues(const QByteArray &key) const; - void removeEncodedQueryItem(const QByteArray &key); - void removeAllEncodedQueryItems(const QByteArray &key); + void setEncodedQuery(const QByteArray &query); void setFragment(const QString &fragment); QString fragment() const; @@ -218,6 +194,15 @@ public: { return fromAce(punycode); } QT_DEPRECATED static QByteArray toPunycode(const QString &string) { return toAce(string); } + QT_DEPRECATED inline void setQueryItems(const QList > &qry); + QT_DEPRECATED inline void addQueryItem(const QString &key, const QString &value); + QT_DEPRECATED inline QList > queryItems() const; + QT_DEPRECATED inline bool hasQueryItem(const QString &key) const; + QT_DEPRECATED inline QString queryItemValue(const QString &key) const; + QT_DEPRECATED inline QStringList allQueryItemValues(const QString &key) const; + QT_DEPRECATED inline void removeQueryItem(const QString &key); + QT_DEPRECATED inline void removeAllQueryItems(const QString &key); + #endif static QString fromAce(const QByteArray &); @@ -262,6 +247,10 @@ Q_CORE_EXPORT QDebug operator<<(QDebug, const QUrl &); QT_END_NAMESPACE +#if QT_DEPRECATED_SINCE(5,0) +# include +#endif + QT_END_HEADER #endif // QURL_H -- cgit v1.2.3