Commit 1386ed23 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against last qt5.15 without deprecated methods

parent 126979d7
......@@ -131,7 +131,11 @@ void GravatarResolvUrlJob::processNextBackend()
void GravatarResolvUrlJob::slotFinishLoadPixmap(QNetworkReply *reply)
{
if (reply->error() == QNetworkReply::NoError) {
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
if (reply->error() != QNetworkReply::NoError) {
#else
if (reply->networkError() != QNetworkReply::NoError) {
#endif
d->mPixmap.loadFromData(reply->readAll());
d->mHasGravatar = true;
//For the moment don't use cache other we will store a lot of pixmap
......@@ -139,7 +143,11 @@ void GravatarResolvUrlJob::slotFinishLoadPixmap(QNetworkReply *reply)
GravatarCache::self()->saveGravatarPixmap(d->mCalculatedHash, d->mPixmap);
}
} else {
if (reply->error() == QNetworkReply::ContentNotFoundError) {
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
if (reply->error() != QNetworkReply::ContentNotFoundError) {
#else
if (reply->networkError() != QNetworkReply::ContentNotFoundError) {
#endif
GravatarCache::self()->saveMissingGravatar(d->mCalculatedHash);
} else {
qCDebug(GRAVATAR_LOG) << "Network error:" << reply->request().url() << reply->errorString();
......
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