Skip to content
Snippets Groups Projects
Commit 5a30136b authored by Julien Michel's avatar Julien Michel
Browse files

BUG: Fix #1587 (sync() does not need to called by monteverdi at all, Qt handles it already)

parent 1dde076b
No related branches found
No related tags found
1 merge request!121Resolve "Cannot launch monteverdi if .ini config file is invalid"
......@@ -418,9 +418,6 @@ protected:
const QString& orgName,
const QString& orgDomain );
/**
*/
inline void SynchronizeSettings() const;
//
// Protected attributes.
......@@ -647,8 +644,6 @@ I18nCoreApplication
{
assert( m_Settings!=NULL );
SynchronizeSettings();
return m_Settings->contains( key );
}
......@@ -663,8 +658,6 @@ I18nCoreApplication
// qDebug() << this << "::StoreSettingsKey(" << key << ", " << value << ")";
m_Settings->setValue( key, value );
SynchronizeSettings();
}
/*****************************************************************************/
......@@ -675,42 +668,9 @@ I18nCoreApplication
{
assert( m_Settings!=NULL );
SynchronizeSettings();
return m_Settings->value( key );
}
/*****************************************************************************/
inline
void
I18nCoreApplication
::SynchronizeSettings() const
{
assert( m_Settings!=NULL );
m_Settings->sync();
switch( m_Settings->status() )
{
case QSettings::NoError:
// Ok.
break;
case QSettings::AccessError:
throw SystemError( ToStdString( tr( "Cannot access settings file." ) ) );
break;
case QSettings::FormatError:
throw SystemError( ToStdString( tr( "Bad settings file format." ) ) );
break;
default:
// In case when a new enum value if added in the API.
assert( false );
break;
}
}
} // end namespace 'mvd'
#endif // I18nCoreApplication_h
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment