Invoke interactive update mode if any updates found on startup

This commit is contained in:
elecpower
2022-09-06 09:29:41 +10:00
committed by Peter Feerick
parent 19db99c4c2
commit 38749d713d
3 changed files with 2 additions and 39 deletions
+1 -27
View File
@@ -176,19 +176,6 @@ UpdateInterface::~UpdateInterface()
delete runParams;
}
bool UpdateInterface::autoUpdate(ProgressWidget * progress)
{
this->progress = progress;
if (g.component[m_settingsIdx].checkForUpdate() && !isLatestRelease()) {
runParams->data.flags |= UPDFLG_Update;
runParams->data.updateRelease = latestRelease();
return update();
}
return true;
}
bool UpdateInterface::manualUpdate(ProgressWidget * progress)
{
this->progress = progress;
@@ -241,7 +228,7 @@ bool UpdateInterface::update()
reportProgress(tr("%1 update successful").arg(name), QtInfoMsg);
if (!progress) // auto update
if (!progress)
QMessageBox::information(this, CPN_STR_APP_NAME, tr("%1 update successful").arg(name));
return true;
@@ -1559,19 +1546,6 @@ const QStringList UpdateFactories::releases(const QString & name)
return ret;
}
bool UpdateFactories::autoUpdate(ProgressWidget * progress)
{
bool ok = false;
foreach (UpdateFactoryInterface * factory, registeredUpdateFactories) {
ok = factory->instance()->autoUpdate(progress);
if (!ok)
break;
}
return ok;
}
bool UpdateFactories::manualUpdate(ProgressWidget * progress)
{
bool ok = false;