diff options
Diffstat (limited to 'logic/VersionFile.h')
-rw-r--r-- | logic/VersionFile.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/logic/VersionFile.h b/logic/VersionFile.h index 04694999..37c8c415 100644 --- a/logic/VersionFile.h +++ b/logic/VersionFile.h @@ -5,8 +5,21 @@ #include <memory> #include "logic/OpSys.h" #include "logic/OneSixRule.h" +#include "MMCError.h" + class VersionFinal; +class VersionBuildError : public MMCError +{ +public: + VersionBuildError(QString cause) : MMCError(cause) {}; + virtual QString errorName() + { + return "VersionBuildError"; + }; + virtual ~VersionBuildError() {}; +}; + struct VersionFile { int order; @@ -65,26 +78,17 @@ struct VersionFile }; DependType dependType = Soft; - static Library fromJson(const QJsonObject &libObj, const QString &filename, - bool &isError); + static Library fromJson(const QJsonObject &libObj, const QString &filename); }; bool shouldOverwriteLibs = false; QList<Library> overwriteLibs; QList<Library> addLibs; QList<QString> removeLibs; - enum ApplyError - { - LauncherVersionError, - OtherError, - NoApplyError - }; - static VersionFile fromJson(const QJsonDocument &doc, const QString &filename, - const bool requireOrder, bool &isError, - const bool isFTB = false); + const bool requireOrder, const bool isFTB = false); static std::shared_ptr<OneSixLibrary> createLibrary(const Library &lib); int findLibrary(QList<std::shared_ptr<OneSixLibrary>> haystack, const QString &needle); - ApplyError applyTo(VersionFinal *version); + void applyTo(VersionFinal *version); };
\ No newline at end of file |