Index: sources/view/settings/VSettings.cpp =================================================================== diff -u -r76680860f735250b4557eb18fe7422a26c406f23 -r99e5b87f73c3b849ba33a212ec84cf4bf6ef38f1 --- sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision 76680860f735250b4557eb18fe7422a26c406f23) +++ sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision 99e5b87f73c3b849ba33a212ec84cf4bf6ef38f1) @@ -28,14 +28,21 @@ void VSettings::initConnections() { ACTION_VIEW_CONNECTION (SettingsData ); + connect(&_GuiController, SIGNAL(didActionReceive (GuiActionType, const QVariantList &)), + this , SLOT( onActionReceive (GuiActionType, const QVariantList &))); + +} + +void VSettings::initConnectionsSettings() +{ + static bool init = false; if ( init ) return; + PROPERTY_POST_CONNECTION(VSettings, servicePass ); PROPERTY_POST_CONNECTION(VSettings, alarmVolume ); PROPERTY_POST_CONNECTION(VSettings, roWaterMode ); PROPERTY_POST_CONNECTION(VSettings, noCANBus ); - connect(&_GuiController, SIGNAL(didActionReceive (GuiActionType, const QVariantList &)), - this , SLOT( onActionReceive (GuiActionType, const QVariantList &))); - + init = true; } void VSettings::servicePass_post(const QString &vservicePass) { @@ -127,7 +134,10 @@ 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(); adjustment(true); + + initConnectionsSettings(); } VSettings::TKeysList VSettings::updateReplacements(const QString &vGroup, const QStringList &vKeys) @@ -281,10 +291,12 @@ * \param vPassword - the given password string * \return true if it matches. */ -bool View::VSettings::isServicePasswordMatch(const QString &vPassword) { - - //DEBUG qDebug() << __FUNCTION__ << hashedPassword(vPassword, true); - return _servicePass == hashedPassword(vPassword, true); +bool View::VSettings::isServicePasswordMatch(const QString &vPassword) +{ + //DEBUG qDebug() << __FUNCTION__ << _servicePass << hashedPassword(vPassword, true); + bool isNotEmpty = ( ! vPassword.trimmed().isEmpty() ); + bool isMatch = ( _servicePass == hashedPassword(vPassword, true) ); + return isMatch && isNotEmpty; } /*!