summaryrefslogtreecommitdiffstats
path: root/logic/Env.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-01-31 19:21:47 +0100
committerPetr Mrázek <peterix@gmail.com>2015-04-02 11:30:38 +0200
commit9249768db5f5b09d67e81370da828e3cb99cc3df (patch)
tree3b915d591fe4cada33da7ebb8d9fd67df7d6a467 /logic/Env.cpp
parent6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f (diff)
downloadMultiMC-9249768db5f5b09d67e81370da828e3cb99cc3df.tar
MultiMC-9249768db5f5b09d67e81370da828e3cb99cc3df.tar.gz
MultiMC-9249768db5f5b09d67e81370da828e3cb99cc3df.tar.lz
MultiMC-9249768db5f5b09d67e81370da828e3cb99cc3df.tar.xz
MultiMC-9249768db5f5b09d67e81370da828e3cb99cc3df.zip
NOISSUE Make tests no longer use the MultiMC object
They do not require the application part anymore
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"));