From c3ff652ff8c612054fa102234677c74fcd19a51c Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 22 Mar 2019 17:33:10 -0500 Subject: Only change to the update filter if mods are being checked for update or mods have updates available --- src/modinfo.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/modinfo.h') diff --git a/src/modinfo.h b/src/modinfo.h index 81f59b61..f1d816fe 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -167,6 +167,15 @@ public: **/ static std::vector getByModID(QString game, int modID); + /** + * @brief retrieve a ModInfo object based on its name + * + * @param name the name to look up + * @return a reference counting pointer to the mod info + * @note since the pointer is reference counter, the pointer remains valid even if the collection is refreshed in a different thread + **/ + static ModInfo::Ptr getByName(const QString &name); + /** * @brief remove a mod by index * @@ -199,8 +208,9 @@ public: /** * @brief query nexus information for every mod and update the "newest version" information + * @return true if any mods are checked for update **/ - static void checkAllForUpdate(PluginContainer *pluginContainer, QObject *receiver); + static bool checkAllForUpdate(PluginContainer *pluginContainer, QObject *receiver); static std::set> filteredMods(QString gameName, QVariantList updateData, bool addOldMods = false, bool markUpdated = false); -- cgit v1.3.1