changeset 240:14c6a4d40232

Move settings struct definition to main.h
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 08 May 2018 00:18:34 +0300
parents 9626307f3eeb
children ea85ff97a01c
files src/main.cpp src/main.h
diffstat 2 files changed, 25 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.cpp	Mon May 07 23:33:52 2018 +0300
+++ b/src/main.cpp	Tue May 08 00:18:34 2018 +0300
@@ -16,23 +16,11 @@
 #include "runguard.h"
 
 
-//
-// Application settings struct
+
 //
-struct
-{
-    QPoint uiPos;
-    QSize  uiSize;
-    double uiScale;              // Global UI scale factor
-
-    QString dataPath;            // Application data path/directory
-
-    // Backup related settings
-    int     dbBackupMode;
-    QString dbBackupURL;
-    QString dbBackupSecret;
-    QDateTime dbLastBackup;
-} settings;
+// Global struct for settings
+//
+SLAppSettings settings;
 
 
 //
--- a/src/main.h	Mon May 07 23:33:52 2018 +0300
+++ b/src/main.h	Tue May 08 00:18:34 2018 +0300
@@ -50,6 +50,27 @@
 
 
 //
+// Application settings struct
+//
+typedef struct
+{
+    QPoint uiPos;
+    QSize  uiSize;
+    double uiScale;              // Global UI scale factor
+
+    QString dataPath;            // Application data path/directory
+
+    // Backup related settings
+    int     dbBackupMode;
+    QString dbBackupURL;
+    QString dbBackupSecret;
+    QDateTime dbLastBackup;
+} SLAppSettings;
+
+extern SLAppSettings settings;
+
+
+//
 // Person information record
 //
 class SLPersonInfo : public QObject