Commit 8785d45a authored by Andreas Traczyk's avatar Andreas Traczyk

linkdevice: provide better debug for possible network errors

Change-Id: Ic2588e20265e20dbd1aaecfa87e68b3bfdb3cb82
parent 7a04c57b
......@@ -92,7 +92,7 @@ LinkDeviceDialog::setExportPage(const std::string& accountId, lrc::api::account:
switch (status) {
case lrc::api::account::ExportOnRingStatus::WRONG_PASSWORD:
ui->infoLabel->setStyleSheet("color: red;");
ui->infoLabel->setStyleSheet("color: black;");
ui->infoLabel->setText(tr("Incorrect password"));
ui->yourPinLabel->hide();
ui->exportedPIN->hide();
......@@ -104,12 +104,18 @@ LinkDeviceDialog::setExportPage(const std::string& accountId, lrc::api::account:
break;
case lrc::api::account::ExportOnRingStatus::NETWORK_ERROR:
disconnect();
ui->infoLabel->setStyleSheet("color: black;");
ui->infoLabel->setText(tr("Error connecting to the network.\nPlease try again later."));
ui->yourPinLabel->hide();
ui->exportedPIN->hide();
case lrc::api::account::ExportOnRingStatus::INVALID:
disconnect();
ui->infoLabel->setStyleSheet("color: red;");
ui->infoLabel->setText(tr("Something went wrong.\nPlease try again later."));
ui->infoLabel->setStyleSheet("color: black;");
ui->infoLabel->setText(tr("Something went wrong.\n"));
ui->yourPinLabel->hide();
ui->exportedPIN->hide();
break;
}
ui->stackedWidget->setCurrentWidget(ui->exportedPage);
......
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