chore(cpn): Switch from component names to ids (#2602)
* cpn(fix): Switch from component names to ids * Fix Win compile * Sound packs list entries should not be editable
This commit is contained in:
@@ -67,23 +67,35 @@ void Updates::autoUpdates(bool interactive)
|
||||
|
||||
factories->resetAllEnvironments();
|
||||
|
||||
QStringList list;
|
||||
QMap<QString, int> components;
|
||||
|
||||
if (!factories->isUpdateAvailable(list)) {
|
||||
if (!factories->isUpdateAvailable(components)) {
|
||||
if (interactive)
|
||||
QMessageBox::information(parentWidget(), CPN_STR_APP_NAME, tr("No updates available at this time"));
|
||||
return;
|
||||
}
|
||||
|
||||
QMapIterator<QString, int> it(components);
|
||||
|
||||
QStringList list;
|
||||
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
list << it.key();
|
||||
}
|
||||
|
||||
if (QMessageBox::question(parentWidget(), CPN_STR_APP_NAME % ": " % tr("Checking for Updates"),
|
||||
tr("Updates available for:\n - %1\n\nProcess now?").arg(list.join("\n - ")),
|
||||
(QMessageBox::Yes | QMessageBox::No), QMessageBox::No) == QMessageBox::No) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < list.count(); i++) {
|
||||
factories->setRunUpdate(list.at(i));
|
||||
factories->updateRelease(list.at(i));
|
||||
it.toFront();
|
||||
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
factories->setRunUpdate(it.value());
|
||||
factories->updateRelease(it.value());
|
||||
}
|
||||
|
||||
runUpdate();
|
||||
|
||||
Reference in New Issue
Block a user