diff --git a/saoriaccount.cpp b/saoriaccount.cpp index c03437e..942b4f5 100644 --- a/saoriaccount.cpp +++ b/saoriaccount.cpp @@ -70,7 +70,7 @@ request.setUrl(QUrl(m_instance->instance().url() + SAORI_MASTODON_APIPATH_ACCOUNTS + "/verify_credentials")); auto *reply = manager->get(request); connect(manager,&QNetworkAccessManager::finished,[=](){ - if (reply->NoError == QNetworkReply::NoError) { + if (reply->error() == QNetworkReply::NoError) { QJsonObject json = QJsonDocument::fromJson(reply->readAll()).object(); QMap info; for(auto it = json.begin();it != json.end();it ++) { @@ -117,7 +117,7 @@ request.setUrl(url); auto *reply = manager->get(request); connect(manager,&QNetworkAccessManager::finished,[=](){ - if (reply->NoError == QNetworkReply::NoError) { + if (reply->error() == QNetworkReply::NoError) { QByteArray data = reply->readAll(); emit apiData(timeline,data); } diff --git a/saoridon.cpp b/saoridon.cpp index b353873..fe834bf 100644 --- a/saoridon.cpp +++ b/saoridon.cpp @@ -150,7 +150,7 @@ request.setUrl(QUrl(instance().url() + SAORI_MASTODON_APIPATH_INSTANCE)); auto *reply = manager->get(request); connect(manager,&QNetworkAccessManager::finished,[=](){ - if (reply->NoError == QNetworkReply::NoError) { + if (reply->error() == QNetworkReply::NoError) { QJsonObject json = QJsonDocument::fromJson(reply->readAll()).object(); QMap info; for (auto it = json.begin();it != json.end();it ++) {