diff --git a/apps/opencs/model/settings/usersettings.cpp b/apps/opencs/model/settings/usersettings.cpp index 3729ed6cc..a1cb91402 100644 --- a/apps/opencs/model/settings/usersettings.cpp +++ b/apps/opencs/model/settings/usersettings.cpp @@ -35,15 +35,11 @@ CSMSettings::UserSettings *CSMSettings::UserSettings::mUserSettingsInstance = 0; CSMSettings::UserSettings::UserSettings (const Files::ConfigurationManager& configurationManager) : mCfgMgr (configurationManager) , mSettingDefinitions(NULL) - , mSettingCfgDefinitions(NULL) { assert(!mUserSettingsInstance); mUserSettingsInstance = this; buildSettingModelDefaults(); - - // for overriding opencs.ini settings with those from settings.cfg - mSettingCfgDefinitions = new QSettings(QSettings::IniFormat, QSettings::UserScope, "", QString(), this); } void CSMSettings::UserSettings::buildSettingModelDefaults() @@ -351,10 +347,6 @@ void CSMSettings::UserSettings::loadSettings (const QString &fileName) mSettingDefinitions = new QSettings (QSettings::IniFormat, QSettings::UserScope, "opencs", QString(), this); - - // check if override entry exists (default: disabled) - if(!mSettingDefinitions->childGroups().contains("Video", Qt::CaseInsensitive)) - mSettingDefinitions->setValue("Video/use settings.cfg", "false"); } // if the key is not found create one with a defaut value @@ -391,23 +383,10 @@ QString CSMSettings::UserSettings::settingValue (const QString &settingKey) { QStringList defs; - // check if video settings are overriden - if(settingKey.contains(QRegExp("^Video\\b", Qt::CaseInsensitive)) && - mSettingDefinitions->value("Video/use settings.cfg") == "true" && - settingKey.contains(QRegExp("^Video/\\brender|antialiasing|vsync|fullscreen\\b", Qt::CaseInsensitive))) - { - if (!mSettingCfgDefinitions->contains (settingKey)) - return QString(); - else - defs = mSettingCfgDefinitions->value (settingKey).toStringList(); - } - else - { - if (!mSettingDefinitions->contains (settingKey)) - return QString(); + if (!mSettingDefinitions->contains (settingKey)) + return QString(); - defs = mSettingDefinitions->value (settingKey).toStringList(); - } + defs = mSettingDefinitions->value (settingKey).toStringList(); if (defs.isEmpty()) return QString(); diff --git a/apps/opencs/model/settings/usersettings.hpp b/apps/opencs/model/settings/usersettings.hpp index ef5c61438..37c7cffb5 100644 --- a/apps/opencs/model/settings/usersettings.hpp +++ b/apps/opencs/model/settings/usersettings.hpp @@ -36,7 +36,6 @@ namespace CSMSettings { const Files::ConfigurationManager& mCfgMgr; QSettings *mSettingDefinitions; - QSettings *mSettingCfgDefinitions; QList mSettings; QString mSection; std::map mSectionLabels;