diff options
Diffstat (limited to 'api/logic/Env.cpp')
-rw-r--r-- | api/logic/Env.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/api/logic/Env.cpp b/api/logic/Env.cpp index d7be4a28..59d4c4a8 100644 --- a/api/logic/Env.cpp +++ b/api/logic/Env.cpp @@ -3,11 +3,13 @@ #include "BaseVersion.h" #include "BaseVersionList.h" #include <QDir> +#include <QCoreApplication> #include <QNetworkProxy> #include <QNetworkAccessManager> #include <QDebug> #include "tasks/Task.h" #include "meta/Index.h" +#include "FileSystem.h" #include <QDebug> @@ -19,6 +21,7 @@ public: std::shared_ptr<IIconList> m_iconlist; QMap<QString, std::shared_ptr<BaseVersionList>> m_versionLists; shared_qobject_ptr<Meta::Index> m_metadataIndex; + QString m_jarsPath; }; static Env * instance; @@ -190,4 +193,18 @@ void Env::updateProxySettings(QString proxyTypeStr, QString addr, int port, QStr qDebug() << proxyDesc; } +QString Env::getJarsPath() +{ + if(d->m_jarsPath.isEmpty()) + { + return FS::PathCombine(QCoreApplication::applicationDirPath(), "jars"); + } + return d->m_jarsPath; +} + +void Env::setJarsPath(const QString& path) +{ + d->m_jarsPath = path; +} + #include "Env.moc" |