summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2024-02-19 15:58:23 -0500
committerLouie S <louie@example.com>2024-02-19 15:58:23 -0500
commita276acd4e0c8031fdef41f11a4fa2285b671207d (patch)
treee28ba115c97257184e67f9a6787a81671e2aa437 /src/settings.cpp
parent8145f61fc830c8a3eaf7a9455756b861efb17683 (diff)
Set config creation
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
new file mode 100644
index 0000000..4fe67d1
--- /dev/null
+++ b/src/settings.cpp
@@ -0,0 +1,14 @@
+#include <QDir>
+#include <QSettings>
+#include <QStandardPaths>
+
+#include "settings.h"
+
+void Settings::createConfig() {
+ QSettings settings;
+ QDir local_data_dir(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation));
+
+ settings.beginGroup("paths");
+ settings.setValue("db_path", local_data_dir.filePath("data.db"));
+ settings.endGroup();
+}