Refactor Version usage out of GUI code

This commit is contained in:
Oliver Hamlet
2017-02-06 18:02:17 +00:00
parent 52382ddb20
commit d3308cbefd
4 changed files with 7 additions and 2 deletions
+5
View File
@@ -34,6 +34,7 @@
#include "backend/game/game.h"
#include "backend/helpers/helpers.h"
#include "backend/helpers/version.h"
using libespm::FormId;
using std::set;
@@ -143,6 +144,10 @@ size_t Plugin::NumOverrideFormIDs() const {
return numOverrideRecords_;
}
std::string Plugin::GetVersion() const {
return Version(getDescription()).AsString();
}
std::set<FormId> Plugin::OverlapFormIDs(const Plugin& plugin) const {
set<FormId> formIds(getFormIds());
set<FormId> otherFormIds(plugin.getFormIds());
+1
View File
@@ -51,6 +51,7 @@ public:
bool IsEmpty() const;
uint32_t Crc() const;
size_t NumOverrideFormIDs() const;
std::string GetVersion() const;
bool LoadsArchive() const;
bool IsActive() const;
+1 -1
View File
@@ -146,7 +146,7 @@ private:
pluginNode["isMaster"] = plugin.isMasterFile();
pluginNode["loadsArchive"] = plugin.LoadsArchive();
pluginNode["crc"] = plugin.Crc();
pluginNode["version"] = Version(plugin.getDescription()).AsString();
pluginNode["version"] = plugin.GetVersion();
BOOST_LOG_TRIVIAL(trace) << "Getting masterlist metadata for: " << plugin.Name();
Plugin mlistPlugin(plugin);
-1
View File
@@ -74,7 +74,6 @@
#include "backend/plugin/plugin_sorter.h"
#include "backend/helpers/helpers.h"
#include "gui/query/json.h"
#include "backend/helpers/version.h"
#include "loot/loot_version.h"
using boost::filesystem::exists;