Commit 8fe48ee2 authored by Clement CHAVANCE's avatar Clement CHAVANCE

the default value are now only loaded one time

parent 4be9e3bd
......@@ -47,22 +47,6 @@ SettingsManager::~SettingsManager()
{
}
//void SettingsManager::setValues( const QString& part, SettingsPart::ConfigPair values )
//{
// if ( !m_tempData.contains( part ) )
// addNewSettingsPart( part );
// m_globalLock.lockForRead();
// SettingsPart* sett = m_tempData[part];
// m_globalLock.unlock();
// SettingsPart::ConfigPair::iterator it = values.begin();
// SettingsPart::ConfigPair::iterator end = values.end();
//
// QWriteLocker lock( &sett->m_lock );
// for ( ; it != end; ++it )
// sett->m_data.insert( it.key(), it.value() );
// return ;
//}
void SettingsManager::setValue( const QString& part , const QString& key, const QVariant& value )
{
m_globalLock.lockForRead();
......@@ -216,10 +200,13 @@ void SettingsManager::flush()
void SettingsManager::loadDefaultsSettings()
{
VLMCSettingsDefault::load( "default" );
VLMCSettingsDefault::load( "VLMC" );
ProjectSettingsDefault::load( "default" );
ProjectSettingsDefault::load( "project" );
if ( !SettingsManager::m_defaultLoaded )
{
VLMCSettingsDefault::load( "default" );
VLMCSettingsDefault::load( "VLMC" );
ProjectSettingsDefault::load( "default" );
ProjectSettingsDefault::load( "project" );
}
}
SettingsManager* SettingsManager::getInstance()
......
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