Commit 2a33b672 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove deprecated signal

parent 76f4c097
......@@ -78,9 +78,16 @@ void ScamExpandUrlJob::expandedUrl(const QUrl &url)
qCDebug(MESSAGEVIEWER_LOG) << " newUrl " << newUrl;
QNetworkReply *reply = d->mNetworkAccessManager->get(QNetworkRequest(newUrl));
reply->setProperty("shortUrl", url.url());
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(reply,
qOverload<QNetworkReply::NetworkError>(&QNetworkReply::error), this,
&ScamExpandUrlJob::slotError);
#else
connect(reply,
qOverload<QNetworkReply::NetworkError>(&QNetworkReply::errorOccurred), this,
&ScamExpandUrlJob::slotError);
#endif
}
void ScamExpandUrlJob::slotExpandFinished(QNetworkReply *reply)
......
......@@ -166,7 +166,13 @@ void CheckPhishingUrlJob::start()
//curl -H "Content-Type: application/json" -X POST -d '{"client":{"clientId":"KDE","clientVersion":"5.4.0"},"threatInfo":{"platformTypes":["WINDOWS"],"threatEntries":[{"url":"http://www.kde.org"}],"threatEntryTypes":["URL"],"threatTypes":["MALWARE"]}}' https://safebrowsing.googleapis.com/v4/threatMatches:find?key=AIzaSyBS62pXATjabbH2RM_jO2EzDg1mTMHlnyo
QNetworkReply *reply = d->mNetworkAccessManager->post(request, baPostData);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(reply, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::error), this, &CheckPhishingUrlJob::slotError);
#else
connect(reply, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::errorOccurred), this, &CheckPhishingUrlJob::slotError);
#endif
} else {
Q_EMIT result(WebEngineViewer::CheckPhishingUrlUtil::InvalidUrl, d->mUrl);
deleteLater();
......
......@@ -94,7 +94,12 @@ void CreatePhishingUrlDataBaseJob::start()
qCDebug(WEBENGINEVIEWER_LOG) << " postData.toJson()" << baPostData;
//curl -H "Content-Type: application/json" -X POST -d '{"client":{"clientId":"KDE","clientVersion":"5.4.0"},"threatInfo":{"platformTypes":["WINDOWS"],"threatEntries":[{"url":"http://www.kde.org"}],"threatEntryTypes":["URL"],"threatTypes":["MALWARE"]}}' https://safebrowsing.googleapis.com/v4/threatMatches:find?key=AIzaSyBS62pXATjabbH2RM_jO2EzDg1mTMHlnyo
QNetworkReply *reply = d->mNetworkAccessManager->post(request, baPostData);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(reply, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::error), this, &CreatePhishingUrlDataBaseJob::slotError);
#else
connect(reply, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::errorOccurred), this, &CreatePhishingUrlDataBaseJob::slotError);
#endif
}
}
......
......@@ -264,7 +264,12 @@ void SearchFullHashJob::start()
//qCDebug(WEBENGINEVIEWER_LOG) << " postData.toJson()" << baPostData;
Q_EMIT debugJson(baPostData);
QNetworkReply *reply = d->mNetworkAccessManager->post(request, baPostData);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(reply, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::error), this, &SearchFullHashJob::slotError);
#else
connect(reply, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::errorOccurred), this, &SearchFullHashJob::slotError);
#endif
} else {
Q_EMIT result(WebEngineViewer::CheckPhishingUrlUtil::InvalidUrl, d->mUrl);
deleteLater();
......
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