diff options
| author | Victor Tran <vicr12345@gmail.com> | 2018-12-05 01:56:15 +1100 |
|---|---|---|
| committer | Victor Tran <vicr12345@gmail.com> | 2018-12-05 01:56:15 +1100 |
| commit | d47d30c8dc4ddf2a6bd84162dedb159559cfeacc (patch) | |
| tree | 75e278ee5e8498943c8613f8a5cf435e317a686c /installer/mainwindow.cpp | |
| parent | 84d2d3998ba64880c9a2736c1bad046176610e68 (diff) | |
| download | theInstaller-d47d30c8dc4ddf2a6bd84162dedb159559cfeacc.tar.gz theInstaller-d47d30c8dc4ddf2a6bd84162dedb159559cfeacc.tar.bz2 theInstaller-d47d30c8dc4ddf2a6bd84162dedb159559cfeacc.zip | |
New flag to update an app
Diffstat (limited to 'installer/mainwindow.cpp')
| -rw-r--r-- | installer/mainwindow.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/installer/mainwindow.cpp b/installer/mainwindow.cpp index a739455..e66e273 100644 --- a/installer/mainwindow.cpp +++ b/installer/mainwindow.cpp @@ -152,7 +152,11 @@ void MainWindow::getInstallerMetadata() { ui->licenseLabel->setVisible(false); } - ui->stack->setCurrentIndex(2); + if (autoProgress) { + ui->installButton->click(); + } else { + ui->stack->setCurrentIndex(2); + } }); connect(reply, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::error), [=](QNetworkReply::NetworkError code) { ui->metadataErrorLabel->setText(tr("Couldn't retrieve metadata")); @@ -288,7 +292,13 @@ void MainWindow::on_installButton_clicked() installDone = true; this->setWindowFlag(Qt::WindowCloseButtonHint, true); this->show(); - ui->stack->setCurrentIndex(5); + + if (autoProgress) { + ui->openCheckbox->setChecked(true); + ui->finishButton->click(); + } else { + ui->stack->setCurrentIndex(5); + } taskbarButton->progress()->setVisible(false); } else if (parts.at(0) == "ALERT") { @@ -440,3 +450,7 @@ void MainWindow::on_licenseLabel_linkActivated(const QString &link) { licenseWidget->show(link, this->licenses.value(link)); } + +void MainWindow::setAutoProgress(bool autoProgress) { + this->autoProgress = autoProgress; +} |
