diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-01-27 19:20:07 +0100 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2014-01-27 19:20:07 +0100 |
commit | f9ea3dbfdea0db5626a6afadcfd599a5f53d8abd (patch) | |
tree | e02cbc9b4f290a7ea4fe37cd2996f6a8f2595177 /logic/OneSixVersionBuilder.h | |
parent | 966f9d1206fee51641c9ae844323f85316a59b1d (diff) | |
download | MultiMC-f9ea3dbfdea0db5626a6afadcfd599a5f53d8abd.tar MultiMC-f9ea3dbfdea0db5626a6afadcfd599a5f53d8abd.tar.gz MultiMC-f9ea3dbfdea0db5626a6afadcfd599a5f53d8abd.tar.lz MultiMC-f9ea3dbfdea0db5626a6afadcfd599a5f53d8abd.tar.xz MultiMC-f9ea3dbfdea0db5626a6afadcfd599a5f53d8abd.zip |
Split parsing/applying. Better error logging. Fix crash.
Diffstat (limited to 'logic/OneSixVersionBuilder.h')
-rw-r--r-- | logic/OneSixVersionBuilder.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/logic/OneSixVersionBuilder.h b/logic/OneSixVersionBuilder.h index a3ba331c..ac8c13bf 100644 --- a/logic/OneSixVersionBuilder.h +++ b/logic/OneSixVersionBuilder.h @@ -22,12 +22,13 @@ class OneSixInstance; class QWidget; class QJsonObject; class QFileInfo; +class VersionFile; class OneSixVersionBuilder { OneSixVersionBuilder(); public: - static bool build(OneSixVersion *version, OneSixInstance *instance, QWidget *widgetParent); + static bool build(OneSixVersion *version, OneSixInstance *instance, QWidget *widgetParent, const bool excludeCustom); static bool read(OneSixVersion *version, const QJsonObject &obj); private: @@ -35,19 +36,8 @@ private: OneSixInstance *m_instance; QWidget *m_widgetParent; - enum Type - { - Override, - Add, - Remove - }; - - bool build(); + bool build(const bool excludeCustom); bool read(const QJsonObject &obj); - void clear(); - bool apply(const QJsonObject &object); - bool applyLibrary(const QJsonObject &lib, const Type type); - - bool read(const QFileInfo &fileInfo, QJsonObject *out); + bool read(const QFileInfo &fileInfo, const bool requireOrder, VersionFile *out); }; |