Commit 3102974b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against last qt5.15 without deprecated methods

parent 2baa8d48
......@@ -69,7 +69,11 @@ QJsonArray WikiData::query(const char *sparqlQuery, const char *cacheFileName)
auto reply = nam.get(QNetworkRequest(url));
QObject::connect(reply, &QNetworkReply::finished, QCoreApplication::instance(), &QCoreApplication::quit);
QCoreApplication::exec();
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
qWarning() << reply->errorString();
return {};
}
......
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