Changeset View
Changeset View
Standalone View
Standalone View
host/abstractbrowserplugin.cpp
Show All 23 Lines | |||||
24 | #include "abstractbrowserplugin.h" | 24 | #include "abstractbrowserplugin.h" | ||
25 | #include "connection.h" | 25 | #include "connection.h" | ||
26 | #include "settings.h" | 26 | #include "settings.h" | ||
27 | 27 | | |||
28 | AbstractBrowserPlugin::AbstractBrowserPlugin::AbstractBrowserPlugin(const QString& subsystemId, int protocolVersion, QObject* parent): | 28 | AbstractBrowserPlugin::AbstractBrowserPlugin::AbstractBrowserPlugin(const QString& subsystemId, int protocolVersion, QObject* parent): | ||
29 | QObject(parent), | 29 | QObject(parent), | ||
30 | m_subsystem(subsystemId) | 30 | m_subsystem(subsystemId) | ||
31 | { | 31 | { | ||
32 | sendData(QStringLiteral("created"), {{QStringLiteral("version"), protocolVersion}}); | 32 | | ||
33 | } | 33 | } | ||
34 | 34 | | |||
35 | void AbstractBrowserPlugin::handleData(const QString& event, const QJsonObject& data) | 35 | void AbstractBrowserPlugin::handleData(const QString& event, const QJsonObject& data) | ||
36 | { | 36 | { | ||
37 | Q_UNUSED(event); | 37 | Q_UNUSED(event); | ||
38 | Q_UNUSED(data); | 38 | Q_UNUSED(data); | ||
39 | } | 39 | } | ||
40 | 40 | | |||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | |||||
82 | } | 82 | } | ||
83 | 83 | | |||
84 | void AbstractBrowserPlugin::setLoaded(bool loaded) | 84 | void AbstractBrowserPlugin::setLoaded(bool loaded) | ||
85 | { | 85 | { | ||
86 | if (m_loaded == loaded) { | 86 | if (m_loaded == loaded) { | ||
87 | return; | 87 | return; | ||
88 | } | 88 | } | ||
89 | 89 | | |||
90 | if (loaded) { | | |||
91 | sendData(QStringLiteral("loaded")); | | |||
92 | } else { | | |||
93 | sendData(QStringLiteral("unloaded")); | | |||
94 | } | | |||
95 | | ||||
96 | m_loaded = loaded; | 90 | m_loaded = loaded; | ||
97 | } | 91 | } | ||
98 | 92 | | |||
99 | QJsonObject AbstractBrowserPlugin::settings() const | 93 | QJsonObject AbstractBrowserPlugin::settings() const | ||
100 | { | 94 | { | ||
101 | return Settings::self().settingsForPlugin(m_subsystem); | 95 | return Settings::self().settingsForPlugin(m_subsystem); | ||
102 | } | 96 | } |