Save initial settings

This commit is contained in:
Jonas Kvinge
2020-10-01 22:04:38 +02:00
parent 48ee471def
commit 390fd64a74
19 changed files with 107 additions and 71 deletions

View File

@@ -56,7 +56,7 @@
class QHideEvent;
class QShowEvent;
const char *NotificationsSettingsPage::kSettingsGroup = "Notifications";
//const char *NotificationsSettingsPage::kSettingsGroup = "Notifications";
NotificationsSettingsPage::NotificationsSettingsPage(SettingsDialog* dialog)
: SettingsPage(dialog), ui_(new Ui_NotificationsSettingsPage), pretty_popup_(new OSDPretty(OSDPretty::Mode_Draggable)) {
@@ -142,6 +142,7 @@ void NotificationsSettingsPage::hideEvent(QHideEvent*) {
void NotificationsSettingsPage::Load() {
QSettings s;
if (!s.contains(OSDBase::kSettingsGroup)) set_changed();
s.beginGroup(OSDBase::kSettingsGroup);
OSDBase::Behaviour osd_behaviour = OSDBase::Behaviour(s.value("Behaviour", OSDBase::Native).toInt());