summaryrefslogtreecommitdiff
path: root/src/organizercore.h
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-12-02 21:08:22 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2020-12-02 21:08:22 +0100
commitcb453a9ba70106832eec2cb0feecbd91d2e8b7d7 (patch)
treec23efc7f1ad1679fe906c43f6886e1c78c0308c5 /src/organizercore.h
parent4f7f378d8d6f9ec93d7e024ce73cda6b177fc490 (diff)
Fix callbacks for IOrganizer when plugin are unloaded/loaded.
Diffstat (limited to 'src/organizercore.h')
-rw-r--r--src/organizercore.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/organizercore.h b/src/organizercore.h
index 23b624e8..1b77b7f5 100644
--- a/src/organizercore.h
+++ b/src/organizercore.h
@@ -61,6 +61,8 @@ class OrganizerCore : public QObject, public MOBase::IPluginDiagnose
private:
+ friend class OrganizerProxy;
+
struct SignalCombinerAnd
{
typedef bool result_type;
@@ -87,7 +89,7 @@ private:
using SignalProfileRemoved = boost::signals2::signal<void(QString const&)>;
using SignalProfileChanged = boost::signals2::signal<void (MOBase::IProfile *, MOBase::IProfile *)>;
using SignalPluginSettingChanged = boost::signals2::signal<void (QString const&, const QString& key, const QVariant&, const QVariant&)>;
- using SignalPluginEnabled = boost::signals2::signal<void(MOBase::IPlugin*)>;
+ using SignalPluginEnabled = boost::signals2::signal<void(const MOBase::IPlugin*)>;
public:
@@ -328,16 +330,16 @@ public:
ModList *modList();
void refresh(bool saveChanges = true);
- bool onAboutToRun(const std::function<bool(const QString&)>& func);
- bool onFinishedRun(const std::function<void(const QString&, unsigned int)>& func);
- bool onUserInterfaceInitialized(std::function<void(QMainWindow*)> const& func);
- bool onProfileCreated(std::function<void(MOBase::IProfile*)> const& func);
- bool onProfileRenamed(std::function<void(MOBase::IProfile*, QString const&, QString const&)> const& func);
- bool onProfileRemoved(std::function<void(QString const&)> const& func);
- bool onProfileChanged(std::function<void(MOBase::IProfile*, MOBase::IProfile*)> const& func);
- bool onPluginSettingChanged(std::function<void(QString const&, const QString& key, const QVariant&, const QVariant&)> const& func);
- bool onPluginEnabled(std::function<void(const MOBase::IPlugin*)> const& func);
- bool onPluginDisabled(std::function<void(const MOBase::IPlugin*)> const& func);
+ boost::signals2::connection onAboutToRun(const std::function<bool(const QString&)>& func);
+ boost::signals2::connection onFinishedRun(const std::function<void(const QString&, unsigned int)>& func);
+ boost::signals2::connection onUserInterfaceInitialized(std::function<void(QMainWindow*)> const& func);
+ boost::signals2::connection onProfileCreated(std::function<void(MOBase::IProfile*)> const& func);
+ boost::signals2::connection onProfileRenamed(std::function<void(MOBase::IProfile*, QString const&, QString const&)> const& func);
+ boost::signals2::connection onProfileRemoved(std::function<void(QString const&)> const& func);
+ boost::signals2::connection onProfileChanged(std::function<void(MOBase::IProfile*, MOBase::IProfile*)> const& func);
+ boost::signals2::connection onPluginSettingChanged(std::function<void(QString const&, const QString& key, const QVariant&, const QVariant&)> const& func);
+ boost::signals2::connection onPluginEnabled(std::function<void(const MOBase::IPlugin*)> const& func);
+ boost::signals2::connection onPluginDisabled(std::function<void(const MOBase::IPlugin*)> const& func);
bool getArchiveParsing() const
{