mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-10 23:23:52 +01:00
Some update fixing.
This commit is contained in:
parent
e1e8f18a8b
commit
e5af61bd4f
@ -165,22 +165,19 @@ void FormUpdate::saveUpdateFile(const QByteArray &file_contents) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FormUpdate::updateCompleted(QNetworkReply::NetworkError status, QByteArray contents) {
|
void FormUpdate::updateCompleted(QNetworkReply::NetworkError status, QByteArray contents) {
|
||||||
qDebug("Download of application update file was completed with code '%d'.",
|
qDebug("Download of application update file was completed with code '%d'.", status);
|
||||||
status);
|
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case QNetworkReply::NoError:
|
case QNetworkReply::NoError:
|
||||||
saveUpdateFile(contents);
|
saveUpdateFile(contents);
|
||||||
|
|
||||||
m_ui->m_lblStatus->setStatus(WidgetWithStatus::Ok, tr("Downloaded successfully"),
|
m_ui->m_lblStatus->setStatus(WidgetWithStatus::Ok, tr("Downloaded successfully"), tr("Package was downloaded successfully."));
|
||||||
tr("Package was downloaded successfully."));
|
|
||||||
m_btnUpdate->setText(tr("Install update"));
|
m_btnUpdate->setText(tr("Install update"));
|
||||||
m_btnUpdate->setEnabled(true);
|
m_btnUpdate->setEnabled(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
m_ui->m_lblStatus->setStatus(WidgetWithStatus::Error, tr("Error occured"),
|
m_ui->m_lblStatus->setStatus(WidgetWithStatus::Error, tr("Error occured"), tr("Error occured during downloading of the package."));
|
||||||
tr("Error occured during downloading of the package."));
|
|
||||||
m_btnUpdate->setText(tr("Error occured"));
|
m_btnUpdate->setText(tr("Error occured"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user