Work on updating...
This commit is contained in:
parent
e06fb13ed3
commit
24835ca8ec
@ -411,6 +411,8 @@ void FormMain::showUpdates() {
|
||||
QPointer<FormUpdate> form_update = new FormUpdate(this);
|
||||
form_update.data()->exec();
|
||||
delete form_update.data();
|
||||
|
||||
SystemFactory::instance()->applicationCloseLock()->unlock();
|
||||
}
|
||||
|
||||
void FormMain::showSettings() {
|
||||
|
@ -24,6 +24,9 @@ FormUpdate::FormUpdate(QWidget *parent)
|
||||
MessageBox::iconify(m_ui->m_buttonBox);
|
||||
#endif
|
||||
|
||||
connect(m_ui->m_cmbAvailableRelease->comboBox(), SIGNAL(currentIndexChanged(int)),
|
||||
this, SLOT(updateChanges(int)));
|
||||
|
||||
m_ui->m_lblCurrentRelease->setText(APP_VERSION);
|
||||
|
||||
checkForUpdates();
|
||||
@ -33,6 +36,14 @@ FormUpdate::~FormUpdate() {
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void FormUpdate::updateChanges(int new_release_index) {
|
||||
if (new_release_index >= 0) {
|
||||
UpdateInfo info = m_ui->m_cmbAvailableRelease->comboBox()->itemData(new_release_index).value<UpdateInfo>();
|
||||
|
||||
m_ui->m_txtChanges->setText(info.m_changes);
|
||||
}
|
||||
}
|
||||
|
||||
void FormUpdate::checkForUpdates() {
|
||||
QByteArray releases_xml;
|
||||
QNetworkReply::NetworkError download_result = NetworkFactory::downloadFeedFile(RELEASES_LIST,
|
||||
|
@ -18,7 +18,8 @@ class FormUpdate : public QDialog {
|
||||
explicit FormUpdate(QWidget *parent = 0);
|
||||
virtual ~FormUpdate();
|
||||
|
||||
protected:
|
||||
protected slots:
|
||||
void updateChanges(int new_release_index);
|
||||
void checkForUpdates();
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user