Some changes to TT-RSS test in add dialog.

This commit is contained in:
Martin Rotter 2015-12-17 07:59:56 +01:00
parent 64efefc030
commit 161d4b4137
1 changed files with 7 additions and 2 deletions

View File

@ -126,7 +126,7 @@ void FormEditAccount::performTest() {
TtRssLoginResponse result = factory.login();
if (factory.lastError() == QNetworkReply::NoError) {
if (result.isLoaded()) {
if (result.hasError()) {
QString error = result.error();
@ -159,11 +159,16 @@ void FormEditAccount::performTest() {
tr("Tiny Tiny RSS server is okay."));
}
}
else {
else if (factory.lastError() != QNetworkReply::NoError ) {
m_ui->m_lblTestResult->setStatus(WidgetWithStatus::Error,
tr("Network error: '%1'.").arg(NetworkFactory::networkErrorText(factory.lastError())),
tr("Network error, have you entered correct Tiny Tiny RSS API endpoint and password?"));
}
else {
m_ui->m_lblTestResult->setStatus(WidgetWithStatus::Error,
tr("Unspecified error, did you enter correct URL?"),
tr("Unspecified error, did you enter correct URL?"));
}
}
void FormEditAccount::onClickedOk() {