feat(cpn): Enhancements to update component runtime options (#2324)

* enh(cpn): Save update component asset options and manage in app settings

* Add option to delete decompress folders independent of delete download folder

* Fix sdsync to point to last update folder

* Update options dlg to allow choosing release channel and saving settings as defaults

* Rename params

* Asset options dialog shared between settings and update run. Add to Save as defaults
This commit is contained in:
Neil Horne
2022-09-26 08:55:16 +10:00
committed by GitHub
parent 30c54b48c9
commit 3563e917c6
31 changed files with 1016 additions and 555 deletions
+10 -6
View File
@@ -237,20 +237,24 @@ void MainWindow::onLanguageChanged(QAction * act)
void MainWindow::autoCheckForUpdates()
{
statusBar()->showMessage(tr("Checking for updates..."));
doUpdates(true, false);
statusBar()->clearMessage();
}
void MainWindow::manualCheckForUpdates()
{
doUpdates(true, true);
statusBar()->showMessage(tr("Checking for updates..."));
doUpdates(true);
statusBar()->clearMessage();
}
void MainWindow::downloads()
{
doUpdates(false, true);
doUpdates(false);
}
void MainWindow::doUpdates(bool check, bool manual)
void MainWindow::doUpdates(bool check, bool interactive)
{
Updates *upd = new Updates(this, updateFactories);
@@ -259,9 +263,9 @@ void MainWindow::doUpdates(bool check, bool manual)
});
if (check)
upd->checkForUpdates(manual);
upd->autoUpdates(interactive);
else
upd->doUpdates();
upd->manualUpdates();
delete upd;
}
@@ -471,7 +475,7 @@ void MainWindow::sdsync(bool postUpdate)
}
if (postUpdate)
syncOpts.folderA = g.updateDir();
syncOpts.folderA = g.lastUpdateDir();
if (syncOpts.folderA.isEmpty())
syncOpts.folderA = g.profile[g.id()].sdPath();