Commit 67024f4c authored by Julien Michel's avatar Julien Michel

Merge branch '1587-no-exception-if-config-file-is-corrupted' into 'release-6.6'

Resolve "Cannot launch monteverdi if .ini config file is invalid"

See merge request !121
parents ae29f020 5a30136b
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment