summaryrefslogtreecommitdiff
path: root/src/settings.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-11-07 16:16:47 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2020-11-07 20:16:26 -0500
commit90ea45328d72f9664ace3cfbdce700dbe7a1d016 (patch)
tree125343bdc83e5322c82b5fc92fbfd103181acf92 /src/settings.h
parent6ca1ebc349528d5f6fc9194c590a17ecbe9fa444 (diff)
moved splash stuff to MOSplash
comments
Diffstat (limited to 'src/settings.h')
-rw-r--r--src/settings.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/settings.h b/src/settings.h
index c8325ba2..fc7789f0 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -195,6 +195,10 @@ private:
class WidgetSettings
{
public:
+ // globalInstance is forwarded from the Settings constructor; WidgetSettings
+ // has the callbacks used by QuestionBoxMemory and those are global, so they
+ // should only be set by the global instance
+ //
WidgetSettings(QSettings& s, bool globalInstance);
// selected index for a combobox
@@ -671,6 +675,20 @@ class Settings : public QObject
Q_OBJECT;
public:
+ // there is one Settings global object for MO when an instance is loaded, but
+ // other Settings objects are required in several places, such as in the
+ // Instance class, the instance dialogs, etc.
+ //
+ // any Settings object created with globalInstance==false won't set the
+ // singleton
+ //
+ // only WidgetSettings need to know whether it created from a globalInstance,
+ // see its constructor
+ //
+ // @param path path to an ini file
+ // @param globalInsance whether this is the global instance; creates the
+ // singleton and asserts if it already exists
+ //
Settings(const QString& path, bool globalInstance=false);
~Settings();