aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/GlobalSettingStation.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-04-28 17:02:17 +0000
committersaturneric <[email protected]>2024-04-28 17:02:17 +0000
commit2af2fff270c32837f8cce133268d96fa285a7b3e (patch)
treefbd43d12645fc2497841933a9b126d3abe86d742 /src/core/function/GlobalSettingStation.cpp
parentMerge branch 'dev/2.1.2/main' into develop (diff)
downloadGpgFrontend-2af2fff270c32837f8cce133268d96fa285a7b3e.tar.gz
GpgFrontend-2af2fff270c32837f8cce133268d96fa285a7b3e.zip
feat: load both integrated and external modules
Diffstat (limited to 'src/core/function/GlobalSettingStation.cpp')
-rw-r--r--src/core/function/GlobalSettingStation.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/function/GlobalSettingStation.cpp b/src/core/function/GlobalSettingStation.cpp
index 7b21ebca..45ab11f9 100644
--- a/src/core/function/GlobalSettingStation.cpp
+++ b/src/core/function/GlobalSettingStation.cpp
@@ -69,6 +69,7 @@ class GlobalSettingStation::Impl {
if (!QDir(app_data_path_).exists()) QDir(app_data_path_).mkpath(".");
if (!QDir(app_log_path_).exists()) QDir(app_log_path_).mkpath(".");
+ if (!QDir(GetModulesDir()).exists()) QDir(GetModulesDir()).mkpath(".");
}
[[nodiscard]] auto GetSettings() -> QSettings {
@@ -124,6 +125,15 @@ class GlobalSettingStation::Impl {
*/
[[nodiscard]] auto GetLogDir() const -> QString { return app_log_path_; }
+ /**
+ * @brief Get the Modules Dir object
+ *
+ * @return QString
+ */
+ [[nodiscard]] auto GetModulesDir() const -> QString {
+ return GetAppDataPath() + "/mods";
+ }
+
private:
QString working_path_ = QDir::currentPath();
@@ -174,6 +184,10 @@ auto GlobalSettingStation::GetAppDataPath() const -> QString {
return p_->GetLogDir();
}
+[[nodiscard]] auto GlobalSettingStation::GetModulesDir() const -> QString {
+ return p_->GetModulesDir();
+}
+
auto GlobalSettingStation::GetLogFilesSize() const -> QString {
return p_->GetLogFilesSize();
}