summaryrefslogtreecommitdiffstats
path: root/MultiMC.h
diff options
context:
space:
mode:
Diffstat (limited to 'MultiMC.h')
-rw-r--r--MultiMC.h84
1 files changed, 46 insertions, 38 deletions
diff --git a/MultiMC.h b/MultiMC.h
index c634dd33..ec28cab2 100644
--- a/MultiMC.h
+++ b/MultiMC.h
@@ -1,9 +1,12 @@
#pragma once
#include <QApplication>
-#include <QSharedPointer>
#include "MultiMCVersion.h"
#include "config.h"
+#include <memory>
+#include "logger/QsLog.h"
+#include "logger/QsLogDest.h"
+
class MinecraftVersionList;
class LWJGLVersionList;
@@ -29,67 +32,72 @@ public:
Succeeded,
Initialized,
};
-
+
public:
- MultiMC ( int& argc, char** argv );
+ MultiMC(int &argc, char **argv);
virtual ~MultiMC();
-
- QSharedPointer<SettingsObject> settings()
+
+ std::shared_ptr<SettingsObject> settings()
{
return m_settings;
- };
-
- QSharedPointer<InstanceList> instances()
+ }
+
+ std::shared_ptr<InstanceList> instances()
{
return m_instances;
- };
-
- QSharedPointer<IconList> icons();
-
+ }
+
+ std::shared_ptr<IconList> icons();
+
Status status()
{
return m_status;
}
-
+
MultiMCVersion version()
{
return m_version;
}
-
- QSharedPointer<QNetworkAccessManager> qnam()
+
+ std::shared_ptr<QNetworkAccessManager> qnam()
{
return m_qnam;
}
-
- QSharedPointer<HttpMetaCache> metacache()
+
+ std::shared_ptr<HttpMetaCache> metacache()
{
return m_metacache;
}
-
- QSharedPointer<LWJGLVersionList> lwjgllist();
-
- QSharedPointer<ForgeVersionList> forgelist();
-
- QSharedPointer<MinecraftVersionList> minecraftlist();
-
+
+ std::shared_ptr<LWJGLVersionList> lwjgllist();
+
+ std::shared_ptr<ForgeVersionList> forgelist();
+
+ std::shared_ptr<MinecraftVersionList> minecraftlist();
+
private:
+ void initLogger();
+
void initGlobalSettings();
-
+
void initHttpMetaCache();
-
+
void initTranslations();
+
private:
- QSharedPointer<QTranslator> m_qt_translator;
- QSharedPointer<QTranslator> m_mmc_translator;
- QSharedPointer<SettingsObject> m_settings;
- QSharedPointer<InstanceList> m_instances;
- QSharedPointer<IconList> m_icons;
- QSharedPointer<QNetworkAccessManager> m_qnam;
- QSharedPointer<HttpMetaCache> m_metacache;
- QSharedPointer<LWJGLVersionList> m_lwjgllist;
- QSharedPointer<ForgeVersionList> m_forgelist;
- QSharedPointer<MinecraftVersionList> m_minecraftlist;
-
+ std::shared_ptr<QTranslator> m_qt_translator;
+ std::shared_ptr<QTranslator> m_mmc_translator;
+ std::shared_ptr<SettingsObject> m_settings;
+ std::shared_ptr<InstanceList> m_instances;
+ std::shared_ptr<IconList> m_icons;
+ std::shared_ptr<QNetworkAccessManager> m_qnam;
+ std::shared_ptr<HttpMetaCache> m_metacache;
+ std::shared_ptr<LWJGLVersionList> m_lwjgllist;
+ std::shared_ptr<ForgeVersionList> m_forgelist;
+ std::shared_ptr<MinecraftVersionList> m_minecraftlist;
+ QsLogging::DestinationPtr m_fileDestination;
+ QsLogging::DestinationPtr m_debugDestination;
+
Status m_status = MultiMC::Failed;
MultiMCVersion m_version = {VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD};
-}; \ No newline at end of file
+};