diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/categories.cpp | 11 | ||||
| -rw-r--r-- | src/categories.h | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/categories.cpp b/src/categories.cpp index b1bd899e..3d625791 100644 --- a/src/categories.cpp +++ b/src/categories.cpp @@ -33,6 +33,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. using namespace MOBase; +CategoryFactory* CategoryFactory::s_Instance = nullptr; QString CategoryFactory::categoriesFilePath() { @@ -50,6 +51,11 @@ CategoryFactory::CategoryFactory() : QObject() { } +QString CategoryFactory::nexusMappingFilePath() +{ + return qApp->property("dataPath").toString() + "/nexuscatmap.dat"; +} + void CategoryFactory::loadCategories() { reset(); @@ -179,6 +185,11 @@ void CategoryFactory::setParents() } } +void CategoryFactory::cleanup() +{ + delete s_Instance; + s_Instance = nullptr; +} void CategoryFactory::saveCategories() { diff --git a/src/categories.h b/src/categories.h index a1aa92fc..1df7295b 100644 --- a/src/categories.h +++ b/src/categories.h @@ -224,7 +224,11 @@ private: void setParents(); + static void cleanup(); + private: + static CategoryFactory* s_Instance; + std::vector<Category> m_Categories; std::map<int, unsigned int> m_IDMap; std::map<int, NexusCategory> m_NexusMap; |
