Allow access to system scope setting.

This commit add a Settings::Scope parameter to
Core::ICore::settings(), the default is UserScope,
which falls back to SystemScope. Specifying SystemScope
instead gives exclusive access to the SystemScope.
This commit is contained in:
Daniel Molkentin
2010-01-13 17:37:53 +01:00
parent 88e24a61d6
commit 047901aab2
6 changed files with 27 additions and 6 deletions

View File

@@ -36,6 +36,7 @@
#include <QtCore/QMap>
#include <QtGui/QColor>
#include <QtCore/QSettings>
QT_BEGIN_NAMESPACE
class QSettings;
@@ -107,7 +108,7 @@ public:
Core::MimeDatabase *mimeDatabase() const;
VCSManager *vcsManager() const;
inline QSettings *settings() const { return m_settings; }
QSettings *settings(QSettings::Scope scope) const;
inline SettingsDatabase *settingsDatabase() const { return m_settingsDatabase; }
virtual QPrinter *printer() const;
IContext * currentContextObject() const;
@@ -176,6 +177,7 @@ private:
QList<int> m_globalContext;
QList<int> m_additionalContexts;
QSettings *m_settings;
QSettings *m_globalSettings;
SettingsDatabase *m_settingsDatabase;
mutable QPrinter *m_printer;
ActionManagerPrivate *m_actionManager;