Commit 31da698c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

error vs networkError was reverted

parent 7b2116d1
Pipeline #16025 passed with stage
in 7 minutes and 55 seconds
......@@ -113,11 +113,7 @@ void LyricsWidget::showEvent(QShowEvent *)
void LyricsWidget::receiveListReply(QNetworkReply* reply)
{
disconnect(m_networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(receiveListReply(QNetworkReply*)));
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
if (reply->error() != QNetworkReply::NoError) {
#else
if (reply->networkError() != QNetworkReply::NoError) {
#endif
qCWarning(JUK_LOG) << "Error while fetching lyrics: " << reply->errorString();
setHtml(i18n("<span style='color:red'>Error while retrieving lyrics!</span>"));
return;
......@@ -146,11 +142,7 @@ void LyricsWidget::receiveListReply(QNetworkReply* reply)
void LyricsWidget::receiveLyricsReply(QNetworkReply* reply)
{
disconnect(m_networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(receiveLyricsReply(QNetworkReply*)));
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
if (reply->error() != QNetworkReply::NoError) {
#else
if (reply->networkError() != QNetworkReply::NoError) {
#endif
qCWarning(JUK_LOG) << "Error while fetching lyrics: " << reply->errorString();
setHtml(i18n("<span style='color:red'>Error while retrieving lyrics!</span>"));
return;
......
......@@ -187,11 +187,7 @@ void Scrobbler::handleAuthenticationReply()
QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
qCDebug(JUK_LOG) << "got authentication reply";
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
if (reply->error() != QNetworkReply::NoError) {
#else
if (reply->networkError() != QNetworkReply::NoError) {
#endif
emit invalidAuth();
qCWarning(JUK_LOG) << "Error while getting authentication reply" << 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