Index: sources/view/settings/VSettings.cpp =================================================================== diff -u -r5687815256ae070a9a207107088e3f72dd464da0 -ra75bc5b80ad4ebde50f028b550cd534e589bd059 --- sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision 5687815256ae070a9a207107088e3f72dd464da0) +++ sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision a75bc5b80ad4ebde50f028b550cd534e589bd059) @@ -40,15 +40,14 @@ PROPERTY_POST_CONNECTION(VSettings, servicePass ); PROPERTY_POST_CONNECTION(VSettings, alarmVolume ); PROPERTY_POST_CONNECTION(VSettings, roWaterMode ); - PROPERTY_POST_CONNECTION(VSettings, noCANBus ); init = true; } void VSettings::servicePass_post(const QString &vservicePass) { //TODO The Settings shall be the Singleton SettingsController and modify the MSettings like the others. Storage::Settings settings; - if ( settings.save(servicePassCategory(), servicePassGroup(), servicePassKey(), vservicePass) != 0 ) { + if ( settings.saveSystem(servicePassGroup(), servicePassKey(), vservicePass) != 0 ) { servicePass(""); // FIXME: Notify UI with a message } @@ -57,7 +56,7 @@ void VSettings::roWaterMode_post(const bool &vroWaterMode_post) { //TODO The Settings shall be the Singleton SettingsController and modify the MSettings like the others. Storage::Settings settings; - if ( settings.save(roWaterModeCategory(), roWaterModeGroup(), roWaterModeKey(), QString::number(vroWaterMode_post)) != 0 ) { + if ( settings.saveSystem(roWaterModeGroup(), roWaterModeKey(), QString::number(vroWaterMode_post)) != 0 ) { roWaterMode(false); // FIXME: Notify UI with a message } @@ -66,15 +65,9 @@ void VSettings::alarmVolume_post(const quint8 &valarmVolume) { //TODO The Settings shall be the Singleton SettingsController and modify the MSettings like the others. Storage::Settings settings; - settings.save(alarmVolumeCategory(), alarmVolumeGroup(), alarmVolumeKey(), QString::number(valarmVolume)); + settings.saveSystem(alarmVolumeGroup(), alarmVolumeKey(), QString::number(valarmVolume)); } -void VSettings::noCANBus_post(const bool &vnoCANBus) { - //TODO The Settings shall be the Singleton SettingsController and modify the MSettings like the others. - Storage::Settings settings; - settings.save(noCANBusCategory(), noCANBusGroup(), noCANBusKey(), QString::number(vnoCANBus)); -} - void VSettings::onActionReceive(const SettingsData &) { // TODO: this function needs to be moved to the controller, to execute in settings thread not the main thread. @@ -112,14 +105,6 @@ keyValue[key] = mAlarmVolume ; alarmVolume ( mAlarmVolume); } - else if ( isnoCANBus (category, group, key) ) { - bool mNoCANBus; - mNoCANBus = _Settings.value(category, group, key).toBool (); // returns 0/false if fails, so no error checking needed. - keyValue[key] = mNoCANBus ; - noCANBus ( mNoCANBus); - if (_noCANBus ) - LOG_APPED_UI(QString("System is working on NoCANBus set")); - } else { keyValue[key] = _Settings.value(category, group, key); } @@ -136,9 +121,8 @@ servicePass ( _servicePass ); alarmVolume ( _alarmVolume ); roWaterMode ( _roWaterMode ); - // noCANBus ( _noCANBus ); // This line has been put here to remind developers that it is intentionally removed, to not to add a default value. - //DEBUG qDebug() << servicePass() << roWaterMode() << alarmVolume() << noCANBus(); + //DEBUG qDebug() << servicePass() << roWaterMode() << alarmVolume(); adjustment(true); initConnectionsSettings();