mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-24 19:42:24 +03:00
added error message to premium wizard page login.
This commit is contained in:
parent
104051adc4
commit
a986125965
@ -303,6 +303,12 @@ bool SetupWizard::isPremiumLoginValid(QMessageBox& message)
|
||||
connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
|
||||
loop.exec();
|
||||
|
||||
if (reply->error() != QNetworkReply::NoError) {
|
||||
message.setText(tr("Login failed, an error occurred.\n\nError: %1").arg(reply->errorString()));
|
||||
message.exec();
|
||||
return false;
|
||||
}
|
||||
|
||||
QByteArray responseData = reply->readAll();
|
||||
QString responseJson(responseData);
|
||||
|
||||
@ -321,7 +327,7 @@ bool SetupWizard::isPremiumLoginValid(QMessageBox& message)
|
||||
}
|
||||
}
|
||||
|
||||
message.setText(tr("Login failed, an error occurred."));
|
||||
message.setText(tr("Login failed, an error occurred.\n\nServer response:\n\n%1").arg(responseJson.trimmed()));
|
||||
message.exec();
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user