From 4ca35a760dfc53fd69f0f2030868ebeda250ed59 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 25 Feb 2013 14:44:36 -0600 Subject: Fixed a lot of MSVC problems --- libinstance/include/instance.h | 12 ++++++++++++ libinstance/src/instance.cpp | 7 +++++++ 2 files changed, 19 insertions(+) (limited to 'libinstance') diff --git a/libinstance/include/instance.h b/libinstance/include/instance.h index fcf5fa97..5a9a7b02 100644 --- a/libinstance/include/instance.h +++ b/libinstance/include/instance.h @@ -19,6 +19,8 @@ #include #include +#include + #include "inifile.h" #include "libinstance_config.h" @@ -280,6 +282,16 @@ public: */ virtual void updateCurrentVersion(bool keepCurrent = false) = 0; + + //// Settings System //// + + /*! + * \brief Gets this instance's settings object. + * This settings object stores instance-specific settings. + * \return A pointer to this instance's settings object. + */ + virtual SettingsObject &settings(); + protected: /*! * \brief Gets the value of the given field in the instance's config file. diff --git a/libinstance/src/instance.cpp b/libinstance/src/instance.cpp index ac0eca24..85b43640 100644 --- a/libinstance/src/instance.cpp +++ b/libinstance/src/instance.cpp @@ -17,6 +17,8 @@ #include +#include "settingsobject.h" + #include "pathutils.h" Instance::Instance(const QString &rootDir, QObject *parent) : @@ -104,3 +106,8 @@ void Instance::setField(const QString &name, QVariant val) { config.set(name, val); } + +SettingsObject &Instance::settings() +{ + return *globalSettings; +} -- cgit