summaryrefslogtreecommitdiffstats
path: root/logic/Env.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/Env.cpp')
-rw-r--r--logic/Env.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/logic/Env.cpp b/logic/Env.cpp
index de93ded3..daf17d65 100644
--- a/logic/Env.cpp
+++ b/logic/Env.cpp
@@ -4,11 +4,12 @@
#include <QNetworkProxy>
#include <QNetworkAccessManager>
#include "logger/QsLog.h"
-#include "MultiMC.h"
+
+#include <QDebug>
Env::Env()
{
- // null
+ m_qnam = std::make_shared<QNetworkAccessManager>();
}
void Env::destroy()
@@ -23,6 +24,18 @@ Env& Env::Env::getInstance()
return instance;
}
+std::shared_ptr< HttpMetaCache > Env::metacache()
+{
+ Q_ASSERT(m_metacache != nullptr);
+ return m_metacache;
+}
+
+std::shared_ptr< QNetworkAccessManager > Env::qnam()
+{
+ return m_qnam;
+}
+
+
void Env::initHttpMetaCache(QString rootPath, QString staticDataPath)
{
m_metacache.reset(new HttpMetaCache("metacache"));