Skip to content

Commit 87f5c0c

Browse files
committedOct 25, 2018
[o2] Avoid a misleading console error output
1 parent 531f366 commit 87f5c0c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎external/o2/src/o2.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,6 @@ void O2::refresh() {
432432

433433
void O2::onRefreshFinished() {
434434
QNetworkReply *refreshReply = qobject_cast<QNetworkReply *>(sender());
435-
qDebug() << "O2::onRefreshFinished: Error" << (int)refreshReply->error() << refreshReply->errorString();
436435
if (refreshReply->error() == QNetworkReply::NoError) {
437436
QByteArray reply = refreshReply->readAll();
438437
QVariantMap tokens = parseTokenResponse(reply);
@@ -445,6 +444,10 @@ void O2::onRefreshFinished() {
445444
Q_EMIT refreshFinished(QNetworkReply::NoError);
446445
qDebug() << " New token expires in" << expires() << "seconds";
447446
}
447+
else
448+
{
449+
qDebug() << "O2::onRefreshFinished: Error" << (int)refreshReply->error() << refreshReply->errorString();
450+
}
448451
refreshReply->deleteLater();
449452
}
450453

0 commit comments

Comments
 (0)
Please sign in to comment.