aboutsummaryrefslogtreecommitdiff
path: root/installer/mainwindow.cpp
diff options
context:
space:
mode:
authorVictor Tran <vicr12345@gmail.com>2018-12-05 01:56:15 +1100
committerVictor Tran <vicr12345@gmail.com>2018-12-05 01:56:15 +1100
commitd47d30c8dc4ddf2a6bd84162dedb159559cfeacc (patch)
tree75e278ee5e8498943c8613f8a5cf435e317a686c /installer/mainwindow.cpp
parent84d2d3998ba64880c9a2736c1bad046176610e68 (diff)
downloadtheInstaller-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.cpp18
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;
+}