Some changes to TT-RSS test in add dialog.
This commit is contained in:
parent
64efefc030
commit
161d4b4137
|
@ -126,7 +126,7 @@ void FormEditAccount::performTest() {
|
||||||
|
|
||||||
TtRssLoginResponse result = factory.login();
|
TtRssLoginResponse result = factory.login();
|
||||||
|
|
||||||
if (factory.lastError() == QNetworkReply::NoError) {
|
if (result.isLoaded()) {
|
||||||
if (result.hasError()) {
|
if (result.hasError()) {
|
||||||
QString error = result.error();
|
QString error = result.error();
|
||||||
|
|
||||||
|
@ -159,11 +159,16 @@ void FormEditAccount::performTest() {
|
||||||
tr("Tiny Tiny RSS server is okay."));
|
tr("Tiny Tiny RSS server is okay."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else if (factory.lastError() != QNetworkReply::NoError ) {
|
||||||
m_ui->m_lblTestResult->setStatus(WidgetWithStatus::Error,
|
m_ui->m_lblTestResult->setStatus(WidgetWithStatus::Error,
|
||||||
tr("Network error: '%1'.").arg(NetworkFactory::networkErrorText(factory.lastError())),
|
tr("Network error: '%1'.").arg(NetworkFactory::networkErrorText(factory.lastError())),
|
||||||
tr("Network error, have you entered correct Tiny Tiny RSS API endpoint and password?"));
|
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() {
|
void FormEditAccount::onClickedOk() {
|
||||||
|
|
Loading…
Reference in New Issue