From 482f13a50b921e61d34d09f72a7fb4216efe742b Mon Sep 17 00:00:00 2001 From: Tannin Date: Mon, 8 Sep 2014 20:37:23 +0200 Subject: - re-enabled building of loot_cli and started developing against the new api - extended set of default categories - more tolerand bbcode parser - added a few colors for the bbcode parser - more fixes to qt5 compatibility - started work on ability to unloading (and thus re-loading) of plugins - names of plugins are no longer localizable (because those names are also used to store settings) - added settings to disable individual diagnosis settings - path of dependencies is now configured in a .pri file instead of environment variablees - bugfix: if the modid-input is canceled, the id was saved as -1 and wasn't re-requested from the user - bugfix: moving files with the SHFileOperation-Api didn't update the vfs correctly (still not perfect but better) - bugfix: attempt to remove the deleter-file seems to have caused error messages for some users - bugfix: fixed a couple of cases that might have caused the tutorial to hang --- src/pluginlist.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/pluginlist.h') diff --git a/src/pluginlist.h b/src/pluginlist.h index 67d1b640..8c06fefd 100644 --- a/src/pluginlist.h +++ b/src/pluginlist.h @@ -26,15 +26,16 @@ along with Mod Organizer. If not, see . #include #include #include +#ifndef Q_MOC_RUN #include #include +#endif #include #include #include "pdll.h" #include - template class ChangeBracket { public: @@ -212,6 +213,11 @@ public: void refreshLoadOrder(); + void disconnectSlots() { + m_PluginMoved.disconnect_all_slots(); + m_Refreshed.disconnect_all_slots(); + } + public: virtual PluginState state(const QString &name) const; @@ -333,13 +339,11 @@ private: mutable QTimer m_SaveTimer; SignalRefreshed m_Refreshed; + SignalPluginMoved m_PluginMoved; QTemporaryFile m_TempFile; - SignalPluginMoved m_PluginMoved; }; - - #endif // PLUGINLIST_H -- cgit v1.3.1 From 19cb2d4076d3515fa490fce7fbd339e92c7c3adf Mon Sep 17 00:00:00 2001 From: Tannin Date: Wed, 10 Sep 2014 20:37:17 +0200 Subject: plugins can now query the list of masters for a plugin --- src/pluginlist.cpp | 14 ++++++++++++++ src/pluginlist.h | 1 + 2 files changed, 15 insertions(+) (limited to 'src/pluginlist.h') diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 43246b55..ff370fa4 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -667,6 +667,20 @@ bool PluginList::isMaster(const QString &name) const } } +QStringList PluginList::masters(const QString &name) const +{ + auto iter = m_ESPsByName.find(name.toLower()); + if (iter == m_ESPsByName.end()) { + return QStringList(); + } else { + QStringList result; + foreach (const QString &master, m_ESPs[iter->second].m_Masters) { + result.append(master); + } + return result; + } +} + QString PluginList::origin(const QString &name) const { auto iter = m_ESPsByName.find(name.toLower()); diff --git a/src/pluginlist.h b/src/pluginlist.h index 8c06fefd..729c6f8b 100644 --- a/src/pluginlist.h +++ b/src/pluginlist.h @@ -224,6 +224,7 @@ public: virtual int priority(const QString &name) const; virtual int loadOrder(const QString &name) const; virtual bool isMaster(const QString &name) const; + virtual QStringList masters(const QString &name) const; virtual QString origin(const QString &name) const; virtual bool onRefreshed(const std::function &callback); virtual bool onPluginMoved(const std::function &func); -- cgit v1.3.1