Rename resetRun functions
This commit is contained in:
@@ -368,9 +368,10 @@ void UpdateInterface::initParamFolders(UpdateParameters * params)
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateInterface::resetRunParams()
|
||||
void UpdateInterface::resetRunEnvironment()
|
||||
{
|
||||
progress = nullptr;
|
||||
|
||||
*runParams = *dfltParams;
|
||||
runParams->data.flags &= ~UPDFLG_Update;
|
||||
}
|
||||
@@ -1392,20 +1393,20 @@ UpdateParameters * const UpdateFactories::getRunParams(const QString & name)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void UpdateFactories::resetRunParams(const QString & name)
|
||||
void UpdateFactories::resetRunEnvironment(const QString & name)
|
||||
{
|
||||
foreach (UpdateFactoryInterface * factory, registeredUpdateFactories) {
|
||||
if (name == factory->name()) {
|
||||
factory->instance()->resetRunParams();
|
||||
factory->instance()->resetRunEnvironment();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateFactories::resetAllRunParams()
|
||||
void UpdateFactories::resetAllRunEnvironments()
|
||||
{
|
||||
foreach (UpdateFactoryInterface * factory, registeredUpdateFactories) {
|
||||
factory->instance()->resetRunParams();
|
||||
factory->instance()->resetRunEnvironment();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ class UpdateInterface : public QWidget
|
||||
void initParamFolders(UpdateParameters * params);
|
||||
const UpdateParameters * const getDefaultParams() { return dfltParams; }
|
||||
UpdateParameters * getRunParams() { return runParams; }
|
||||
void resetRunParams();
|
||||
void resetRunEnvironment();
|
||||
void setRunUpdate() { runParams->data.flags |= UPDFLG_Update; }
|
||||
|
||||
const QStringList getReleases();
|
||||
@@ -278,8 +278,8 @@ class UpdateFactories : public QWidget
|
||||
|
||||
const UpdateParameters * const getDefaultParams(const QString & name);
|
||||
UpdateParameters * const getRunParams(const QString & name);
|
||||
void resetRunParams(const QString & name);
|
||||
void resetAllRunParams();
|
||||
void resetRunEnvironment(const QString & name);
|
||||
void resetAllRunEnvironments();
|
||||
void setRunUpdate(const QString & name);
|
||||
const QMap<QString, int> sortedComponentsList();
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ UpdateOptionsDialog::UpdateOptionsDialog(QWidget * parent, UpdateFactories * fac
|
||||
|
||||
connect(ui->buttonBox, &QDialogButtonBox::clicked, [=](QAbstractButton * button) {
|
||||
if (ui->buttonBox->standardButton(button) == QDialogButtonBox::RestoreDefaults) {
|
||||
factories->resetRunParams(name);
|
||||
factories->resetRunEnvironment(name);
|
||||
update();
|
||||
}
|
||||
else if (ui->buttonBox->standardButton(button) == QDialogButtonBox::Discard) {
|
||||
|
||||
@@ -70,14 +70,16 @@ void Updates::autoUpdates()
|
||||
tr("One or more updates are available. Update now?"),
|
||||
(QMessageBox::Yes | QMessageBox::No), QMessageBox::No) == QMessageBox::Yes) {
|
||||
|
||||
factories->resetAllRunParams();
|
||||
factories->resetAllRunEnvironments();
|
||||
|
||||
factories->autoUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
void Updates::manualUpdates()
|
||||
{
|
||||
factories->resetAllRunParams();
|
||||
factories->resetAllRunEnvironments();
|
||||
|
||||
UpdatesDialog *dlg = new UpdatesDialog(this, factories);
|
||||
|
||||
if (dlg->exec()) {
|
||||
|
||||
Reference in New Issue
Block a user