Changeset View
Changeset View
Standalone View
Standalone View
host/abstractbrowserplugin.h
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | 44 | protected: | |||
---|---|---|---|---|---|
48 | * | 48 | * | ||
49 | * @arg protocolVersion | 49 | * @arg protocolVersion | ||
50 | * As the browser extension will be shipped separately to the native plugin a user could have incompatiable setups | 50 | * As the browser extension will be shipped separately to the native plugin a user could have incompatiable setups | ||
51 | * Here we inform the browser of the protocol used so if we do ever changed the native API we can at least detect it on the JS side and handle it | 51 | * Here we inform the browser of the protocol used so if we do ever changed the native API we can at least detect it on the JS side and handle it | ||
52 | */ | 52 | */ | ||
53 | AbstractBrowserPlugin(const QString &subsystemId, int protocolVersion, QObject *parent); | 53 | AbstractBrowserPlugin(const QString &subsystemId, int protocolVersion, QObject *parent); | ||
54 | 54 | | |||
55 | virtual void handleData(const QString &event, const QJsonObject &data); | 55 | virtual void handleData(const QString &event, const QJsonObject &data); | ||
56 | virtual QJsonObject handleData(int serial, const QString &event, const QJsonObject &data); | ||||
broulik: Why does it say "got hidden" when those two clearly have a different signature? | |||||
Because only the overridden overload is visible in the child classes. You can fix this by adding using AbstractBrowserPlugin::handleData; to the plugin classes. fvogt: Because only the overridden overload is visible in the child classes. You can fix this by… | |||||
56 | 57 | | |||
57 | virtual bool onLoad(); | 58 | virtual bool onLoad(); | ||
58 | virtual bool onUnload(); | 59 | virtual bool onUnload(); | ||
59 | 60 | | |||
60 | void sendData(const QString &action, const QJsonObject &payload = QJsonObject()); | 61 | void sendData(const QString &action, const QJsonObject &payload = QJsonObject()); | ||
62 | | ||||
63 | void sendReply(int requestSerial, const QJsonObject &payload = QJsonObject()); | ||||
64 | | ||||
61 | QDebug debug() const; | 65 | QDebug debug() const; | ||
62 | 66 | | |||
63 | QJsonObject settings() const; | 67 | QJsonObject settings() const; | ||
64 | 68 | | |||
65 | friend class PluginManager; | 69 | friend class PluginManager; | ||
66 | 70 | | |||
67 | private: | 71 | private: | ||
68 | QString m_subsystem; | 72 | QString m_subsystem; | ||
69 | int m_protocolVersion; | 73 | int m_protocolVersion; | ||
70 | bool m_loaded = false; | 74 | bool m_loaded = false; | ||
71 | 75 | | |||
72 | }; | 76 | }; |
Why does it say "got hidden" when those two clearly have a different signature?