diff --git a/Network/FoxVerifier.cpp b/Network/FoxVerifier.cpp index 750e40df0..d4bc5c82f 100644 --- a/Network/FoxVerifier.cpp +++ b/Network/FoxVerifier.cpp @@ -31,7 +31,9 @@ FoxVerifier::FoxVerifier(QString user_agent, QNetworkAccessManager *manager,QStr reply_ = manager_->get(request_); connect(reply_, &QNetworkReply::finished, this, &FoxVerifier::httpFinished); +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) connect(reply_, &QNetworkReply::errorOccurred, this, &FoxVerifier::errorOccurred); +#endif connect(reply_, &QNetworkReply::redirected, this, &FoxVerifier::httpRedirected); connect(reply_, &QNetworkReply::encrypted, this, &FoxVerifier::httpEncrypted); #if QT_CONFIG(ssl) @@ -52,7 +54,7 @@ bool FoxVerifier::finished() { return finished_; } - +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) void FoxVerifier::errorOccurred(QNetworkReply::NetworkError code) { int status = reply_->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); @@ -65,6 +67,7 @@ void FoxVerifier::errorOccurred(QNetworkReply::NetworkError code) } // TODO emit } +#endif void FoxVerifier::httpFinished() { @@ -115,4 +118,4 @@ QString FoxVerifier::formatDecodeMessage(QDateTime ts, QString callsign, unsigne QString FoxVerifier::default_url() { return QString(FOXVERIFIER_DEFAULT_BASE_URL); -} \ No newline at end of file +} diff --git a/Network/FoxVerifier.hpp b/Network/FoxVerifier.hpp index 0d8a321b8..8d8cada00 100644 --- a/Network/FoxVerifier.hpp +++ b/Network/FoxVerifier.hpp @@ -47,8 +47,6 @@ private slots: #endif #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) void errorOccurred(QNetworkReply::NetworkError code); -#else - void obsoleteError(); #endif //signals: //void results(QString verify_response);