Changeset View
Changeset View
Standalone View
Standalone View
plugins/sendnotifications/sendnotificationsplugin.cpp
Show All 19 Lines | |||||
20 | 20 | | |||
21 | #include "sendnotificationsplugin.h" | 21 | #include "sendnotificationsplugin.h" | ||
22 | 22 | | |||
23 | #include "notificationslistener.h" | 23 | #include "notificationslistener.h" | ||
24 | #include "sendnotification_debug.h" | 24 | #include "sendnotification_debug.h" | ||
25 | 25 | | |||
26 | #include <KPluginFactory> | 26 | #include <KPluginFactory> | ||
27 | 27 | | |||
28 | #ifdef SAILFISHOS | ||||
29 | K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_sendnotifications_sfos.json", registerPlugin< SendNotificationsPlugin >(); ) | ||||
mtijink: Why is this separate file needed? | |||||
It is just so that on sfos I can set the plugin to be enabled by default. Is there a better way? piggz: It is just so that on sfos I can set the plugin to be enabled by default. Is there a better… | |||||
There should be. Having this line is ugly as is, let alone having to ifdef it on every plugin. apol: There should be. Having this line is ugly as is, let alone having to ifdef it on every plugin. | |||||
albertvaka: +1 | |||||
30 | #else | ||||
28 | K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_sendnotifications.json", registerPlugin< SendNotificationsPlugin >(); ) | 31 | K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_sendnotifications.json", registerPlugin< SendNotificationsPlugin >(); ) | ||
32 | #endif | ||||
29 | 33 | | |||
30 | Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SENDNOTIFICATION, "kdeconnect.plugin.sendnotification") | 34 | Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SENDNOTIFICATION, "kdeconnect.plugin.sendnotification") | ||
31 | 35 | | |||
32 | SendNotificationsPlugin::SendNotificationsPlugin(QObject* parent, const QVariantList& args) | 36 | SendNotificationsPlugin::SendNotificationsPlugin(QObject* parent, const QVariantList& args) | ||
33 | : KdeConnectPlugin(parent, args) | 37 | : KdeConnectPlugin(parent, args) | ||
34 | { | 38 | { | ||
35 | notificationsListener = new NotificationsListener(this); | 39 | notificationsListener = new NotificationsListener(this); | ||
36 | } | 40 | } | ||
Show All 18 Lines |
Why is this separate file needed?