diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2015-05-24 13:00:56 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-24 09:37:23 -0700 |
commit | f88fb74b5bf04f98205d96d360ebd25125c0b90d (patch) | |
tree | aff891498862e4929d356d421256ecc3650ad5e2 /qt-ui | |
parent | 660459461cdf2f05eb2f87aef1641a6297854d6b (diff) | |
download | subsurface-f88fb74b5bf04f98205d96d360ebd25125c0b90d.tar.gz |
Remove support for Qt4 (part 4)
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index fad542de6..0d2f42a8d 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -23,9 +23,7 @@ #include <unistd.h> // for dup(2) #endif -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include <QUrlQuery> -#endif #ifndef PATH_MAX #define PATH_MAX 4096 @@ -403,13 +401,9 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton *button) void SubsurfaceWebServices::startDownload() { QUrl url("http://api.hohndel.org/api/dive/get/"); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - url.addQueryItem("login", ui.userID->text().toUpper()); -#else QUrlQuery query; query.addQueryItem("login", ui.userID->text().toUpper()); url.setQuery(query); -#endif QNetworkRequest request; request.setUrl(url); @@ -731,19 +725,11 @@ void DivelogsDeWebServices::startDownload() request.setRawHeader("User-Agent", userAgent.toUtf8()); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - QUrl body; - body.addQueryItem("user", ui.userID->text()); - body.addQueryItem("pass", ui.password->text()); - - reply = manager()->post(request, body.encodedQuery()); -#else QUrlQuery body; body.addQueryItem("user", ui.userID->text()); body.addQueryItem("pass", ui.password->text()); reply = manager()->post(request, body.query(QUrl::FullyEncoded).toLatin1()); -#endif connect(reply, SIGNAL(finished()), this, SLOT(listDownloadFinished())); connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(downloadError(QNetworkReply::NetworkError))); @@ -776,22 +762,12 @@ void DivelogsDeWebServices::listDownloadFinished() request.setRawHeader("User-Agent", userAgent.toUtf8()); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - QUrl body; - body.addQueryItem("user", ui.userID->text()); - body.addQueryItem("pass", ui.password->text()); - body.addQueryItem("ids", diveList.idList); - - reply = manager()->post(request, body.encodedQuery()); -#else QUrlQuery body; body.addQueryItem("user", ui.userID->text()); body.addQueryItem("pass", ui.password->text()); body.addQueryItem("ids", diveList.idList); reply = manager()->post(request, body.query(QUrl::FullyEncoded).toLatin1()); -#endif - connect(reply, SIGNAL(readyRead()), this, SLOT(saveToZipFile())); connectSignalsForDownload(reply); } |