summaryrefslogtreecommitdiff
path: root/src/modinfo.h
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-03-22 17:33:10 -0500
committerLostDragonist <lost.dragonist@gmail.com>2019-03-22 17:33:10 -0500
commitc3ff652ff8c612054fa102234677c74fcd19a51c (patch)
treea3dce005c5ed82989ecff6a8809bc9c72732153a /src/modinfo.h
parentd14125835790fe2d660acddf78e313affde0ee29 (diff)
Only change to the update filter if mods are being checked for update or mods have updates available
Diffstat (limited to 'src/modinfo.h')
-rw-r--r--src/modinfo.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modinfo.h b/src/modinfo.h
index 81f59b61..f1d816fe 100644
--- a/src/modinfo.h
+++ b/src/modinfo.h
@@ -168,6 +168,15 @@ public:
static std::vector<ModInfo::Ptr> 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
*
* this physically deletes the specified mod from the disc and updates the ModInfo collection
@@ -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<QSharedPointer<ModInfo>> filteredMods(QString gameName, QVariantList updateData, bool addOldMods = false, bool markUpdated = false);