1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 00:54:20 +02:00

qt5: port QxtWeb and the web api

This commit is contained in:
Dominik Schmidt
2013-01-05 21:54:39 +01:00
parent d02b6232bf
commit 82753732b9
11 changed files with 77 additions and 51 deletions

View File

@@ -52,6 +52,10 @@ QxtWeb uses QxtWebContent as an abstraction for streaming data.
#include <QCoreApplication>
#include <QThread>
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
#include <QUrlQuery>
#endif
#ifndef QXT_DOXYGEN_RUN
class QxtWebContentPrivate : public QxtPrivate<QxtWebContent>
{
@@ -270,7 +274,11 @@ QHash<QString, QString> QxtWebContent::parseUrlEncodedQuery(const QString& data)
{
QUrl post("/?" + data);
QHash<QString, QString> rv;
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
foreach(const QxtQueryItem& item, QUrlQuery( post ).queryItems())
#else
foreach(const QxtQueryItem& item, post.queryItems())
#endif
{
rv.insertMulti(item.first, item.second);
}