Commit 95b03746 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compiles against qt5.15

parent d8795cbb
...@@ -57,7 +57,11 @@ void LanguageToolGetListOfLanguageJob::start() ...@@ -57,7 +57,11 @@ void LanguageToolGetListOfLanguageJob::start()
void LanguageToolGetListOfLanguageJob::slotFinish(QNetworkReply *reply) void LanguageToolGetListOfLanguageJob::slotFinish(QNetworkReply *reply)
{ {
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
if (reply->error() != QNetworkReply::NoError) { if (reply->error() != QNetworkReply::NoError) {
#else
if (reply->networkError() != QNetworkReply::NoError) {
#endif
qCWarning(LIBLANGUAGE_PLUGIN_LOG) << " Error reply - "<<reply->errorString(); qCWarning(LIBLANGUAGE_PLUGIN_LOG) << " Error reply - "<<reply->errorString();
Q_EMIT error(reply->errorString()); Q_EMIT error(reply->errorString());
} }
......
...@@ -88,7 +88,11 @@ void LanguageToolResultJob::start() ...@@ -88,7 +88,11 @@ void LanguageToolResultJob::start()
void LanguageToolResultJob::slotFinish(QNetworkReply *reply) void LanguageToolResultJob::slotFinish(QNetworkReply *reply)
{ {
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
if (reply->error() != QNetworkReply::NoError) { if (reply->error() != QNetworkReply::NoError) {
#else
if (reply->networkError() != QNetworkReply::NoError) {
#endif
qCWarning(LIBLANGUAGE_PLUGIN_LOG) << " Error reply - "<<reply->errorString(); qCWarning(LIBLANGUAGE_PLUGIN_LOG) << " Error reply - "<<reply->errorString();
Q_EMIT error(reply->errorString()); Q_EMIT error(reply->errorString());
} }
......
...@@ -174,7 +174,11 @@ void AdBlockSubscription::subscriptionDownloaded() ...@@ -174,7 +174,11 @@ void AdBlockSubscription::subscriptionDownloaded()
bool error = false; bool error = false;
const QByteArray response = QString::fromUtf8(mReply->readAll()).toUtf8(); const QByteArray response = QString::fromUtf8(mReply->readAll()).toUtf8();
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
if (mReply->error() != QNetworkReply::NoError if (mReply->error() != QNetworkReply::NoError
#else
if (mReply->networkError() != QNetworkReply::NoError
#endif
|| !response.startsWith(QByteArray("[Adblock")) || !response.startsWith(QByteArray("[Adblock"))
|| !saveDownloadedData(response) || !saveDownloadedData(response)
) { ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment