Qt5: QUrl addQueryItem moved to QUrlQuery
This commit is contained in:
parent
032c41f3d5
commit
648a6a3884
1 changed files with 10 additions and 0 deletions
|
@ -7,6 +7,10 @@
|
|||
#include <QMessageBox>
|
||||
#include <QDesktopServices>
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QUrlQuery>
|
||||
#endif
|
||||
|
||||
DeckStatsInterface::DeckStatsInterface(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
|
@ -42,7 +46,13 @@ void DeckStatsInterface::queryFinished(QNetworkReply *reply)
|
|||
void DeckStatsInterface::analyzeDeck(DeckList *deck)
|
||||
{
|
||||
QUrl params;
|
||||
#if QT_VERSION < 0x050000
|
||||
params.addQueryItem("deck", deck->writeToString_Plain());
|
||||
#else
|
||||
QUrlQuery urlQuery;
|
||||
urlQuery.addQueryItem("deck", deck->writeToString_Plain());
|
||||
params.setUrlQuery(urlQuery);
|
||||
#endif
|
||||
QByteArray data;
|
||||
data.append(params.encodedQuery());
|
||||
|
||||
|
|
Loading…
Reference in a new issue