removed a redundant (and unsufficiently configured) copy of ConfigurationManager

deque
Marc Zinnschlag 11 years ago
parent 804bf523ba
commit 5b5bf6f37e

@ -20,7 +20,7 @@
#include "model/world/data.hpp" #include "model/world/data.hpp"
CS::Editor::Editor (OgreInit::OgreInit& ogreInit) CS::Editor::Editor (OgreInit::OgreInit& ogreInit)
: mDocumentManager (mCfgMgr), mViewManager (mDocumentManager), : mUserSettings (mCfgMgr), mDocumentManager (mCfgMgr), mViewManager (mDocumentManager),
mIpcServerName ("org.openmw.OpenCS") mIpcServerName ("org.openmw.OpenCS")
{ {
std::pair<Files::PathContainer, std::vector<std::string> > config = readConfig(); std::pair<Files::PathContainer, std::vector<std::string> > config = readConfig();

@ -28,7 +28,8 @@ namespace boost
CSMSettings::UserSettings *CSMSettings::UserSettings::mUserSettingsInstance = 0; CSMSettings::UserSettings *CSMSettings::UserSettings::mUserSettingsInstance = 0;
CSMSettings::UserSettings::UserSettings() CSMSettings::UserSettings::UserSettings (const Files::ConfigurationManager& configurationManager)
: mCfgMgr (configurationManager)
{ {
assert(!mUserSettingsInstance); assert(!mUserSettingsInstance);
mUserSettingsInstance = this; mUserSettingsInstance = this;

@ -30,7 +30,7 @@ namespace CSMSettings {
Q_OBJECT Q_OBJECT
static UserSettings *mUserSettingsInstance; static UserSettings *mUserSettingsInstance;
Files::ConfigurationManager mCfgMgr; const Files::ConfigurationManager& mCfgMgr;
QSettings *mSettingDefinitions; QSettings *mSettingDefinitions;
QList <Setting *> mSettings; QList <Setting *> mSettings;
@ -40,11 +40,11 @@ namespace CSMSettings {
/// Singleton implementation /// Singleton implementation
static UserSettings& instance(); static UserSettings& instance();
UserSettings(); UserSettings (const Files::ConfigurationManager& configurationManager);
~UserSettings(); ~UserSettings();
UserSettings (UserSettings const &); //not implemented UserSettings (UserSettings const &); //not implemented
void operator= (UserSettings const &); //not implemented UserSettings& operator= (UserSettings const &); //not implemented
/// Retrieves the settings file at all three levels (global, local and user). /// Retrieves the settings file at all three levels (global, local and user).
void loadSettings (const QString &fileName); void loadSettings (const QString &fileName);

Loading…
Cancel
Save