Provide default implementation for KdeConnectPlugin::connected
In most plugins, we just provided a dummy implementation
This commit is contained in:
parent
7b15a5eab7
commit
e97af9dc15
30 changed files with 3 additions and 78 deletions
|
@ -52,7 +52,9 @@ public Q_SLOTS:
|
|||
* This method will be called when a device is connected to this computer.
|
||||
* The plugin could be loaded already, but there is no guarantee we will be able to reach the device until this is called.
|
||||
*/
|
||||
virtual void connected() = 0;
|
||||
virtual void connected()
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
QScopedPointer<KdeConnectPluginPrivate> d;
|
||||
|
|
|
@ -21,7 +21,6 @@ public:
|
|||
explicit BigscreenPlugin(QObject *parent, const QVariantList &args);
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override{};
|
||||
QString dbusPath() const override;
|
||||
|
||||
Q_SIGNALS:
|
||||
|
|
|
@ -30,10 +30,6 @@ int ConnectivityReportPlugin::cellularNetworkStrength() const
|
|||
return m_cellularNetworkStrength;
|
||||
}
|
||||
|
||||
void ConnectivityReportPlugin::connected()
|
||||
{
|
||||
}
|
||||
|
||||
bool ConnectivityReportPlugin::receivePacket(const NetworkPacket &np)
|
||||
{
|
||||
if (PACKET_TYPE_CONNECTIVITY_REPORT != np.type()) {
|
||||
|
|
|
@ -43,7 +43,6 @@ public:
|
|||
explicit ConnectivityReportPlugin(QObject *parent, const QVariantList &args);
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override;
|
||||
QString dbusPath() const override;
|
||||
|
||||
QString cellularNetworkType() const;
|
||||
|
|
|
@ -24,9 +24,6 @@ public:
|
|||
Q_SCRIPTABLE void ring();
|
||||
|
||||
QString dbusPath() const override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
};
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ class FindThisDevicePlugin : public KdeConnectPlugin
|
|||
public:
|
||||
explicit FindThisDevicePlugin(QObject *parent, const QVariantList &args);
|
||||
|
||||
void connected() override{};
|
||||
QString dbusPath() const override;
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
};
|
||||
|
|
|
@ -39,9 +39,6 @@ public:
|
|||
~MMTelephonyPlugin() override = default;
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
void onCallAdded(ModemManager::Call::Ptr call);
|
||||
|
|
|
@ -34,9 +34,6 @@ public:
|
|||
explicit MprisControlPlugin(QObject *parent, const QVariantList &args);
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
std::optional<GlobalSystemMediaTransportControlsSessionManager> sessionManager;
|
||||
|
|
|
@ -53,9 +53,6 @@ public:
|
|||
explicit MprisControlPlugin(QObject *parent, const QVariantList &args);
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
|
||||
private Q_SLOTS:
|
||||
void propertiesChanged(const QString &propertyInterface, const QVariantMap &properties);
|
||||
|
|
|
@ -50,9 +50,6 @@ public:
|
|||
void setPlayer(const QString &player);
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
QString dbusPath() const override;
|
||||
|
||||
Q_SCRIPTABLE void seek(int offset) const;
|
||||
|
|
|
@ -35,9 +35,6 @@ public:
|
|||
~PauseMusicPlugin();
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
void updatePlayersList();
|
||||
|
|
|
@ -21,9 +21,6 @@ public:
|
|||
explicit PauseMusicPlugin(QObject *parent, const QVariantList &args);
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
QSet<QString> pausedSources;
|
||||
|
|
|
@ -25,9 +25,6 @@ public:
|
|||
Q_SCRIPTABLE void requestPhoto(const QString &url);
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
|
||||
QString dbusPath() const override;
|
||||
|
||||
|
|
|
@ -26,10 +26,6 @@ public:
|
|||
Q_SCRIPTABLE void sendPing(const QString &customMessage);
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
|
||||
QString dbusPath() const override;
|
||||
};
|
||||
|
||||
|
|
|
@ -25,9 +25,6 @@ class Q_DECL_EXPORT PresenterPlugin : public KdeConnectPlugin
|
|||
public:
|
||||
explicit PresenterPlugin(QObject *parent, const QVariantList &args);
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
QPointer<PresenterView> m_view;
|
||||
|
|
|
@ -25,9 +25,6 @@ public:
|
|||
{
|
||||
return false;
|
||||
}
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
QString dbusPath() const override;
|
||||
|
||||
Q_SCRIPTABLE void moveCursor(const QPoint &p);
|
||||
|
|
|
@ -121,10 +121,6 @@ int RemoteKeyboardPlugin::translateQtKey(int qtKey) const
|
|||
return specialKeysMap.value(qtKey, 0);
|
||||
}
|
||||
|
||||
void RemoteKeyboardPlugin::connected()
|
||||
{
|
||||
}
|
||||
|
||||
QString RemoteKeyboardPlugin::dbusPath() const
|
||||
{
|
||||
return QStringLiteral("/modules/kdeconnect/devices/") + device()->id() + QStringLiteral("/remotekeyboard");
|
||||
|
|
|
@ -31,7 +31,6 @@ public:
|
|||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
QString dbusPath() const override;
|
||||
void connected() override;
|
||||
|
||||
bool remoteState() const
|
||||
{
|
||||
|
|
|
@ -33,10 +33,6 @@ ScreensaverInhibitPlugin::~ScreensaverInhibitPlugin()
|
|||
}
|
||||
}
|
||||
|
||||
void ScreensaverInhibitPlugin::connected()
|
||||
{
|
||||
}
|
||||
|
||||
bool ScreensaverInhibitPlugin::receivePacket(const NetworkPacket &np)
|
||||
{
|
||||
Q_UNUSED(np);
|
||||
|
|
|
@ -21,7 +21,6 @@ public:
|
|||
~ScreensaverInhibitPlugin() override;
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override;
|
||||
|
||||
private:
|
||||
QProcess *m_caffeinateProcess;
|
||||
|
|
|
@ -20,7 +20,6 @@ public:
|
|||
~ScreensaverInhibitPlugin() override;
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override{};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -42,10 +42,6 @@ ScreensaverInhibitPlugin::~ScreensaverInhibitPlugin()
|
|||
inhibitInterface.SimulateUserActivity();
|
||||
}
|
||||
|
||||
void ScreensaverInhibitPlugin::connected()
|
||||
{
|
||||
}
|
||||
|
||||
bool ScreensaverInhibitPlugin::receivePacket(const NetworkPacket &np)
|
||||
{
|
||||
Q_UNUSED(np);
|
||||
|
|
|
@ -20,7 +20,6 @@ public:
|
|||
~ScreensaverInhibitPlugin() override;
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override;
|
||||
|
||||
private:
|
||||
uint inhibitCookie;
|
||||
|
|
|
@ -30,8 +30,4 @@ bool SendNotificationsPlugin::receivePacket(const NetworkPacket &np)
|
|||
return true;
|
||||
}
|
||||
|
||||
void SendNotificationsPlugin::connected()
|
||||
{
|
||||
}
|
||||
|
||||
#include "sendnotificationsplugin.moc"
|
||||
|
|
|
@ -28,7 +28,6 @@ public:
|
|||
~SendNotificationsPlugin() override;
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override;
|
||||
|
||||
protected:
|
||||
NotificationsListener *notificationsListener;
|
||||
|
|
|
@ -24,9 +24,6 @@ public:
|
|||
explicit SftpPlugin(QObject *parent, const QVariantList &args);
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
QString dbusPath() const override
|
||||
{
|
||||
return QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/sftp");
|
||||
|
|
|
@ -22,9 +22,6 @@ public:
|
|||
~SftpPlugin() override;
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
QString dbusPath() const override
|
||||
{
|
||||
return QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/sftp");
|
||||
|
|
|
@ -36,9 +36,6 @@ public:
|
|||
}
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
QString dbusPath() const override;
|
||||
|
||||
private Q_SLOTS:
|
||||
|
|
|
@ -148,9 +148,6 @@ public:
|
|||
~SmsPlugin() override;
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
|
||||
QString dbusPath() const override;
|
||||
|
||||
|
|
|
@ -40,9 +40,6 @@ public:
|
|||
~TelephonyPlugin() override = default;
|
||||
|
||||
bool receivePacket(const NetworkPacket &np) override;
|
||||
void connected() override
|
||||
{
|
||||
}
|
||||
QString dbusPath() const override;
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue