Some update fixing.

This commit is contained in:
Martin Rotter 2014-08-26 15:50:16 +02:00
parent e1e8f18a8b
commit e5af61bd4f
1 changed files with 3 additions and 6 deletions

View File

@ -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;
} }