diff -r e6ad4ef83b23 -r b7da29130b0e src/hbcore/inputfw/hbinputsettingproxy.cpp --- a/src/hbcore/inputfw/hbinputsettingproxy.cpp Thu Sep 02 20:44:51 2010 +0300 +++ b/src/hbcore/inputfw/hbinputsettingproxy.cpp Fri Sep 17 08:32:10 2010 +0300 @@ -177,15 +177,15 @@ initializeDataArea(); } - - lock(); - - HbSettingProxyInternalData *prData = proxyData(); - if (prData) { - ++prData->iReferences; +#ifdef Q_OS_UNIX +#ifndef Q_OS_SYMBIAN + else if (proxyData()->iVersion != HbProxyDataRequiredVersion) { + // In unix systems, the shared memory may be left dangling with an outdated version + // In that case, update all the values with defaults to make sure + initializeDataArea(); } - - unlock(); +#endif // Q_OS_SYMBIAN +#endif // Q_OS_UNIX // This is needed because qApp doesn't not exist anymore when singleton destructs. iSaveFile = dataFileNameAndPath(); @@ -199,13 +199,7 @@ void HbInputSettingProxyPrivate::shutdownDataArea() { lock(); - HbSettingProxyInternalData *prData = proxyData(); - if (prData) { - prData->iReferences--; - if (prData->iReferences <= 0) { - save(); - } - } + save(); unlock(); } @@ -226,8 +220,6 @@ HbSettingProxyInternalData *prData = proxyData(); if (prData) { - prData->iReferences = 0; - if (!wasLoaded) { // There was no permanent storage version, so initialize to defaults. prData->iVersion = HbProxyDataRequiredVersion;