diff options
| author | Silarn <jrim@rimpo.org> | 2019-02-01 00:36:44 -0600 |
|---|---|---|
| committer | Silarn <jrim@rimpo.org> | 2019-02-18 21:29:27 -0600 |
| commit | 78ae7072c9a0ea3795dc0610b389e8e335f4eee6 (patch) | |
| tree | a7dea13d0ef166feabdcfb58ca437aaeedf30f2c | |
| parent | 7f56407b916f6ca204e72f25c01965441e0228b1 (diff) | |
Write the file category ID to the mod data when installing/updating
| -rw-r--r-- | src/installationmanager.cpp | 7 | ||||
| -rw-r--r-- | src/installationmanager.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 769394e7..b11f5667 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -561,7 +561,7 @@ bool InstallationManager::ensureValidModName(GuessedValue<QString> &name) const bool InstallationManager::doInstall(GuessedValue<QString> &modName, QString gameName, int modID, const QString &version, const QString &newestVersion, - int categoryID, const QString &repository) + int categoryID, int fileCategoryID, const QString &repository) { if (!ensureValidModName(modName)) { return false; @@ -641,6 +641,7 @@ bool InstallationManager::doInstall(GuessedValue<QString> &modName, QString game if (!settingsFile.contains("category")) { settingsFile.setValue("category", QString::number(categoryID)); } + settingsFile.setValue("nexusFileStatus", fileCategoryID); settingsFile.setValue("installationFile", m_CurrentFile); settingsFile.setValue("repository", repository); settingsFile.setValue("url", m_URL); @@ -727,6 +728,7 @@ bool InstallationManager::install(const QString &fileName, QString version = ""; QString newestVersion = ""; int categoryID = 0; + int fileCategoryID = 1; QString repository = "Nexus"; QString metaName = fileName + ".meta"; @@ -745,6 +747,7 @@ bool InstallationManager::install(const QString &fileName, metaFile.value("category", 0).toInt()); categoryID = CategoryFactory::instance().getCategoryID(categoryIndex); repository = metaFile.value("repository", "").toString(); + fileCategoryID = metaFile.value("fileCategory", 1).toInt(); } if (version.isEmpty()) { @@ -822,7 +825,7 @@ bool InstallationManager::install(const QString &fileName, // the simple installer only prepares the installation, the rest // works the same for all installers if (!doInstall(modName, gameName, modID, version, newestVersion, categoryID, - repository)) { + fileCategoryID, repository)) { installResult = IPluginInstaller::RESULT_FAILED; } } diff --git a/src/installationmanager.h b/src/installationmanager.h index 54fdf169..6e4f5925 100644 --- a/src/installationmanager.h +++ b/src/installationmanager.h @@ -176,7 +176,7 @@ private: MOBase::DirectoryTree::Node *getSimpleArchiveBase(MOBase::DirectoryTree *dataTree); bool doInstall(MOBase::GuessedValue<QString> &modName, QString gameName, - int modID, const QString &version, const QString &newestVersion, int categoryID, const QString &repository); + int modID, const QString &version, const QString &newestVersion, int categoryID, int fileCategoryID, const QString &repository); //QString generateBackupName(const QString &directoryName) const; |
