1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2025-04-21 12:27:27 +03:00

Made SettingsDialog::exec() return whether a setting was changed

Previously, exec() always returned true and a separate edited() method
would indicate whether any settings were changed.
This commit is contained in:
Maarten ter Huurne
2014-08-16 17:11:18 +02:00
parent faf2495727
commit e2382e11fd
3 changed files with 9 additions and 12 deletions

View File

@@ -141,12 +141,6 @@ bool SettingsDialog::exec() {
}
}
return true;
}
bool SettingsDialog::edited() {
for (uint i=0; i < settings.size(); i++) {
if (settings[i]->edited()) return true;
}
return false;
return any_of(settings.begin(), settings.end(),
[](unique_ptr<MenuSetting>& setting){ return setting->edited(); });
}