aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/GlobalSettingStation.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2024-05-11 17:18:36 +0000
committerGitHub <[email protected]>2024-05-11 17:18:36 +0000
commitf909f2c4c35b187eb165ec5545e35d54c6d92bf3 (patch)
tree428fe9e63ecae6bb93be6f20cd2b1ee9b29ffd8d /src/core/function/GlobalSettingStation.cpp
parentMerge pull request #145 from jermanuts/jermanuts-wizard-links-update (diff)
parentfix: remove qt5compat and redirect dll output path of modules (diff)
downloadGpgFrontend-f909f2c4c35b187eb165ec5545e35d54c6d92bf3.tar.gz
GpgFrontend-f909f2c4c35b187eb165ec5545e35d54c6d92bf3.zip
Merge pull request #148 from saturneric/develop
Develop 2.1.3.1
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();
}