mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Refactor Version usage out of GUI code
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user