summaryrefslogtreecommitdiff
path: root/src/modinfo.cpp
diff options
context:
space:
mode:
authorSeth Riley <17361645+Qudix@users.noreply.github.com>2020-11-06 12:02:43 -0600
committerSeth Riley <17361645+Qudix@users.noreply.github.com>2020-11-06 12:02:43 -0600
commited1085d5673e0d307a6172eaaa1be1e9d70e2234 (patch)
tree1e068a2f08e106c8ce15be7034f19336836cc17a /src/modinfo.cpp
parent34e1d05c28bf4676ed8d3e97e969187a05d215b6 (diff)
parentb909677c3fc6a7b7a1993d341a2bd420715e292a (diff)
Merge branch 'master' of https://github.com/ModOrganizer2/modorganizer into master
Diffstat (limited to 'src/modinfo.cpp')
-rw-r--r--src/modinfo.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp
index bbeefb12..a0382fe8 100644
--- a/src/modinfo.cpp
+++ b/src/modinfo.cpp
@@ -266,7 +266,7 @@ void ModInfo::updateFromDisc(const QString &modDirectory,
createFromOverwrite(pluginContainer, game, directoryStructure);
std::sort(s_Collection.begin(), s_Collection.end(), ModInfo::ByName);
-
+
parallelMap(std::begin(s_Collection), std::end(s_Collection), &ModInfo::prefetch, refreshThreadCount);
updateIndices();
@@ -348,19 +348,19 @@ bool ModInfo::checkAllForUpdate(PluginContainer *pluginContainer, QObject *recei
}
for (auto game : organizedGames)
- NexusInterface::instance(pluginContainer)->requestUpdates(game.second, receiver, QVariant(), game.first, QString());
+ NexusInterface::instance().requestUpdates(game.second, receiver, QVariant(), game.first, QString());
} else if (earliest < QDateTime::currentDateTimeUtc().addMonths(-1)) {
for (auto gameName : games)
- NexusInterface::instance(pluginContainer)->requestUpdateInfo(gameName, NexusInterface::UpdatePeriod::MONTH, receiver, QVariant(true), QString());
+ NexusInterface::instance().requestUpdateInfo(gameName, NexusInterface::UpdatePeriod::MONTH, receiver, QVariant(true), QString());
} else if (earliest < QDateTime::currentDateTimeUtc().addDays(-7)) {
for (auto gameName : games)
- NexusInterface::instance(pluginContainer)->requestUpdateInfo(gameName, NexusInterface::UpdatePeriod::MONTH, receiver, QVariant(false), QString());
+ NexusInterface::instance().requestUpdateInfo(gameName, NexusInterface::UpdatePeriod::MONTH, receiver, QVariant(false), QString());
} else if (earliest < QDateTime::currentDateTimeUtc().addDays(-1)) {
for (auto gameName : games)
- NexusInterface::instance(pluginContainer)->requestUpdateInfo(gameName, NexusInterface::UpdatePeriod::WEEK, receiver, QVariant(false), QString());
+ NexusInterface::instance().requestUpdateInfo(gameName, NexusInterface::UpdatePeriod::WEEK, receiver, QVariant(false), QString());
} else {
for (auto gameName : games)
- NexusInterface::instance(pluginContainer)->requestUpdateInfo(gameName, NexusInterface::UpdatePeriod::DAY, receiver, QVariant(false), QString());
+ NexusInterface::instance().requestUpdateInfo(gameName, NexusInterface::UpdatePeriod::DAY, receiver, QVariant(false), QString());
}
return updatesAvailable;
@@ -400,7 +400,7 @@ std::set<QSharedPointer<ModInfo>> ModInfo::filteredMods(QString gameName, QVaria
return finalMods;
}
-void ModInfo::manualUpdateCheck(PluginContainer *pluginContainer, QObject *receiver, std::multimap<QString, int> IDs)
+void ModInfo::manualUpdateCheck(QObject *receiver, std::multimap<QString, int> IDs)
{
std::vector<QSharedPointer<ModInfo>> mods;
std::set<std::pair<QString, int>> organizedGames;
@@ -438,7 +438,7 @@ void ModInfo::manualUpdateCheck(PluginContainer *pluginContainer, QObject *recei
}
for (auto game : organizedGames) {
- NexusInterface::instance(pluginContainer)->requestUpdates(game.second, receiver, QVariant(), game.first, QString());
+ NexusInterface::instance().requestUpdates(game.second, receiver, QVariant(), game.first, QString());
}
} else {
log::info("None of the selected mods can be updated.");