Remove unneeded destructors from plugins

We already have a destructor from the baseclass and don't need to clean
up any resources in the affected plugins
This commit is contained in:
Alexander Lohnau 2023-07-22 10:38:48 +02:00 committed by Albert Vaca Cintora
parent 32abeb8ed0
commit 0b99c3a637
40 changed files with 0 additions and 93 deletions

View file

@ -25,8 +25,6 @@ BigscreenPlugin::BigscreenPlugin(QObject *parent, const QVariantList &args)
{ {
} }
BigscreenPlugin::~BigscreenPlugin() = default;
bool BigscreenPlugin::receivePacket(const NetworkPacket &np) bool BigscreenPlugin::receivePacket(const NetworkPacket &np)
{ {
QString message = np.get<QString>(QStringLiteral("content")); QString message = np.get<QString>(QStringLiteral("content"));

View file

@ -19,7 +19,6 @@ class Q_DECL_EXPORT BigscreenPlugin : public KdeConnectPlugin
public: public:
explicit BigscreenPlugin(QObject *parent, const QVariantList &args); explicit BigscreenPlugin(QObject *parent, const QVariantList &args);
~BigscreenPlugin() override;
bool receivePacket(const NetworkPacket &np) override; bool receivePacket(const NetworkPacket &np) override;
void connected() override{}; void connected() override{};

View file

@ -19,10 +19,6 @@ FindMyPhonePlugin::FindMyPhonePlugin(QObject *parent, const QVariantList &args)
{ {
} }
FindMyPhonePlugin::~FindMyPhonePlugin()
{
}
bool FindMyPhonePlugin::receivePacket(const NetworkPacket &np) bool FindMyPhonePlugin::receivePacket(const NetworkPacket &np)
{ {
Q_UNUSED(np); Q_UNUSED(np);

View file

@ -20,7 +20,6 @@ class FindMyPhonePlugin : public KdeConnectPlugin
public: public:
explicit FindMyPhonePlugin(QObject *parent, const QVariantList &args); explicit FindMyPhonePlugin(QObject *parent, const QVariantList &args);
~FindMyPhonePlugin() override;
Q_SCRIPTABLE void ring(); Q_SCRIPTABLE void ring();

View file

@ -31,8 +31,6 @@ FindThisDevicePlugin::FindThisDevicePlugin(QObject *parent, const QVariantList &
{ {
} }
FindThisDevicePlugin::~FindThisDevicePlugin() = default;
bool FindThisDevicePlugin::receivePacket(const NetworkPacket &np) bool FindThisDevicePlugin::receivePacket(const NetworkPacket &np)
{ {
Q_UNUSED(np); Q_UNUSED(np);

View file

@ -30,7 +30,6 @@ class FindThisDevicePlugin : public KdeConnectPlugin
public: public:
explicit FindThisDevicePlugin(QObject *parent, const QVariantList &args); explicit FindThisDevicePlugin(QObject *parent, const QVariantList &args);
~FindThisDevicePlugin() override;
void connected() override{}; void connected() override{};
QString dbusPath() const override; QString dbusPath() const override;

View file

@ -27,10 +27,6 @@ LockDevicePlugin::LockDevicePlugin(QObject *parent, const QVariantList &args)
{ {
} }
LockDevicePlugin::~LockDevicePlugin()
{
}
bool LockDevicePlugin::isLocked() const bool LockDevicePlugin::isLocked() const
{ {
return m_remoteLocked; // Windows doesn't support monitoring lock status, m_remoteLocked is never updated return m_remoteLocked; // Windows doesn't support monitoring lock status, m_remoteLocked is never updated

View file

@ -22,7 +22,6 @@ class Q_DECL_EXPORT LockDevicePlugin : public KdeConnectPlugin
public: public:
explicit LockDevicePlugin(QObject *parent, const QVariantList &args); explicit LockDevicePlugin(QObject *parent, const QVariantList &args);
~LockDevicePlugin() override;
bool isLocked() const; bool isLocked() const;
Q_SCRIPTABLE void setLocked(bool); Q_SCRIPTABLE void setLocked(bool);

View file

@ -55,10 +55,6 @@ LockDevicePlugin::LockDevicePlugin(QObject *parent, const QVariantList &args)
m_localLocked = m_login1Interface.lockedHint(); m_localLocked = m_login1Interface.lockedHint();
} }
LockDevicePlugin::~LockDevicePlugin()
{
}
bool LockDevicePlugin::isLocked() const bool LockDevicePlugin::isLocked() const
{ {
return m_remoteLocked; return m_remoteLocked;

View file

@ -25,7 +25,6 @@ class Q_DECL_EXPORT LockDevicePlugin : public KdeConnectPlugin
public: public:
explicit LockDevicePlugin(QObject *parent, const QVariantList &args); explicit LockDevicePlugin(QObject *parent, const QVariantList &args);
~LockDevicePlugin() override;
bool isLocked() const; bool isLocked() const;
Q_SCRIPTABLE void setLocked(bool); Q_SCRIPTABLE void setLocked(bool);

View file

@ -172,10 +172,6 @@ WaylandRemoteInput::WaylandRemoteInput(QObject *parent)
{ {
} }
WaylandRemoteInput::~WaylandRemoteInput()
{
}
bool WaylandRemoteInput::handlePacket(const NetworkPacket &np) bool WaylandRemoteInput::handlePacket(const NetworkPacket &np)
{ {
if (!s_session->isValid()) { if (!s_session->isValid()) {

View file

@ -42,7 +42,6 @@ class WaylandRemoteInput : public AbstractRemoteInput
public: public:
explicit WaylandRemoteInput(QObject *parent); explicit WaylandRemoteInput(QObject *parent);
~WaylandRemoteInput();
bool handlePacket(const NetworkPacket &np) override; bool handlePacket(const NetworkPacket &np) override;
bool hasKeyboardSupport() override bool hasKeyboardSupport() override

View file

@ -15,8 +15,6 @@ MprisRemotePlayerMediaPlayer2::MprisRemotePlayerMediaPlayer2(MprisRemotePlayer *
{ {
} }
MprisRemotePlayerMediaPlayer2::~MprisRemotePlayerMediaPlayer2() = default;
bool MprisRemotePlayerMediaPlayer2::CanQuit() const bool MprisRemotePlayerMediaPlayer2::CanQuit() const
{ {
return false; return false;

View file

@ -25,7 +25,6 @@ class MprisRemotePlayerMediaPlayer2 : public QDBusAbstractAdaptor
public: public:
explicit MprisRemotePlayerMediaPlayer2(MprisRemotePlayer *parent, const MprisRemotePlugin *plugin); explicit MprisRemotePlayerMediaPlayer2(MprisRemotePlayer *parent, const MprisRemotePlugin *plugin);
~MprisRemotePlayerMediaPlayer2() override;
public Q_SLOTS: public Q_SLOTS:
void Raise(); void Raise();

View file

@ -27,8 +27,6 @@ MprisRemotePlayerMediaPlayer2Player::MprisRemotePlayerMediaPlayer2Player(MprisRe
connect(m_parent, &MprisRemotePlayer::playingChanged, this, &MprisRemotePlayerMediaPlayer2Player::playingChanged); connect(m_parent, &MprisRemotePlayer::playingChanged, this, &MprisRemotePlayerMediaPlayer2Player::playingChanged);
} }
MprisRemotePlayerMediaPlayer2Player::~MprisRemotePlayerMediaPlayer2Player() = default;
QString MprisRemotePlayerMediaPlayer2Player::PlaybackStatus() const QString MprisRemotePlayerMediaPlayer2Player::PlaybackStatus() const
{ {
if (m_parent->playing()) { if (m_parent->playing()) {

View file

@ -33,7 +33,6 @@ class MprisRemotePlayerMediaPlayer2Player : public QDBusAbstractAdaptor
public: public:
explicit MprisRemotePlayerMediaPlayer2Player(MprisRemotePlayer *parent, MprisRemotePlugin *plugin); explicit MprisRemotePlayerMediaPlayer2Player(MprisRemotePlayer *parent, MprisRemotePlugin *plugin);
~MprisRemotePlayerMediaPlayer2Player() override;
public Q_SLOTS: public Q_SLOTS:
void Next(); void Next();

View file

@ -18,12 +18,6 @@ K_PLUGIN_CLASS_WITH_JSON(MprisRemotePlugin, "kdeconnect_mprisremote.json")
MprisRemotePlugin::MprisRemotePlugin(QObject *parent, const QVariantList &args) MprisRemotePlugin::MprisRemotePlugin(QObject *parent, const QVariantList &args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
, m_currentPlayer()
, m_players()
{
}
MprisRemotePlugin::~MprisRemotePlugin()
{ {
} }

View file

@ -33,7 +33,6 @@ class Q_DECL_EXPORT MprisRemotePlugin : public KdeConnectPlugin
public: public:
explicit MprisRemotePlugin(QObject *parent, const QVariantList &args); explicit MprisRemotePlugin(QObject *parent, const QVariantList &args);
~MprisRemotePlugin() override;
long position() const; long position() const;
int volume() const; int volume() const;

View file

@ -61,10 +61,6 @@ Notification::Notification(const NetworkPacket &np, const Device *device, QObjec
}); });
} }
Notification::~Notification()
{
}
void Notification::dismiss() void Notification::dismiss()
{ {
if (m_dismissable) { if (m_dismissable) {

View file

@ -33,7 +33,6 @@ class Notification : public QObject
public: public:
Notification(const NetworkPacket &np, const Device *device, QObject *parent); Notification(const NetworkPacket &np, const Device *device, QObject *parent);
~Notification() override;
QString internalId() const QString internalId() const
{ {

View file

@ -20,10 +20,6 @@ PhotoPlugin::PhotoPlugin(QObject *parent, const QVariantList &args)
{ {
} }
PhotoPlugin::~PhotoPlugin()
{
}
bool PhotoPlugin::receivePacket(const NetworkPacket &np) bool PhotoPlugin::receivePacket(const NetworkPacket &np)
{ {
if (np.get<bool>(QStringLiteral("cancel"))) { if (np.get<bool>(QStringLiteral("cancel"))) {

View file

@ -21,7 +21,6 @@ class Q_DECL_EXPORT PhotoPlugin : public KdeConnectPlugin
public: public:
explicit PhotoPlugin(QObject *parent, const QVariantList &args); explicit PhotoPlugin(QObject *parent, const QVariantList &args);
~PhotoPlugin() override;
Q_SCRIPTABLE void requestPhoto(const QString &url); Q_SCRIPTABLE void requestPhoto(const QString &url);

View file

@ -58,10 +58,6 @@ PresenterPlugin::PresenterPlugin(QObject *parent, const QVariantList &args)
m_timer->setSingleShot(true); m_timer->setSingleShot(true);
} }
PresenterPlugin::~PresenterPlugin()
{
}
bool PresenterPlugin::receivePacket(const NetworkPacket &np) bool PresenterPlugin::receivePacket(const NetworkPacket &np)
{ {
if (np.get<bool>(QStringLiteral("stop"), false)) { if (np.get<bool>(QStringLiteral("stop"), false)) {

View file

@ -24,8 +24,6 @@ class Q_DECL_EXPORT PresenterPlugin : public KdeConnectPlugin
public: public:
explicit PresenterPlugin(QObject *parent, const QVariantList &args); explicit PresenterPlugin(QObject *parent, const QVariantList &args);
~PresenterPlugin() override;
bool receivePacket(const NetworkPacket &np) override; bool receivePacket(const NetworkPacket &np) override;
void connected() override void connected() override
{ {

View file

@ -24,8 +24,6 @@ RemoteCommandsPlugin::RemoteCommandsPlugin(QObject *parent, const QVariantList &
{ {
} }
RemoteCommandsPlugin::~RemoteCommandsPlugin() = default;
bool RemoteCommandsPlugin::receivePacket(const NetworkPacket &np) bool RemoteCommandsPlugin::receivePacket(const NetworkPacket &np)
{ {
if (np.has(QStringLiteral("commandList"))) { if (np.has(QStringLiteral("commandList"))) {

View file

@ -22,7 +22,6 @@ class Q_DECL_EXPORT RemoteCommandsPlugin : public KdeConnectPlugin
public: public:
explicit RemoteCommandsPlugin(QObject *parent, const QVariantList &args); explicit RemoteCommandsPlugin(QObject *parent, const QVariantList &args);
~RemoteCommandsPlugin() override;
Q_SCRIPTABLE void triggerCommand(const QString &key); Q_SCRIPTABLE void triggerCommand(const QString &key);
Q_SCRIPTABLE void editCommands(); Q_SCRIPTABLE void editCommands();

View file

@ -23,10 +23,6 @@ RemoteControlPlugin::RemoteControlPlugin(QObject *parent, const QVariantList &ar
{ {
} }
RemoteControlPlugin::~RemoteControlPlugin()
{
}
void RemoteControlPlugin::moveCursor(const QPoint &p) void RemoteControlPlugin::moveCursor(const QPoint &p)
{ {
NetworkPacket np(PACKET_TYPE_MOUSEPAD_REQUEST, {{QStringLiteral("dx"), p.x()}, {QStringLiteral("dy"), p.y()}}); NetworkPacket np(PACKET_TYPE_MOUSEPAD_REQUEST, {{QStringLiteral("dx"), p.x()}, {QStringLiteral("dy"), p.y()}});

View file

@ -20,7 +20,6 @@ class Q_DECL_EXPORT RemoteControlPlugin : public KdeConnectPlugin
public: public:
explicit RemoteControlPlugin(QObject *parent, const QVariantList &args); explicit RemoteControlPlugin(QObject *parent, const QVariantList &args);
~RemoteControlPlugin() override;
bool receivePacket(const NetworkPacket & /*np*/) override bool receivePacket(const NetworkPacket & /*np*/) override
{ {

View file

@ -58,10 +58,6 @@ RemoteKeyboardPlugin::RemoteKeyboardPlugin(QObject *parent, const QVariantList &
{ {
} }
RemoteKeyboardPlugin::~RemoteKeyboardPlugin()
{
}
bool RemoteKeyboardPlugin::receivePacket(const NetworkPacket &np) bool RemoteKeyboardPlugin::receivePacket(const NetworkPacket &np)
{ {
if (np.type() == PACKET_TYPE_MOUSEPAD_ECHO) { if (np.type() == PACKET_TYPE_MOUSEPAD_ECHO) {

View file

@ -28,7 +28,6 @@ private:
public: public:
explicit RemoteKeyboardPlugin(QObject *parent, const QVariantList &args); explicit RemoteKeyboardPlugin(QObject *parent, const QVariantList &args);
~RemoteKeyboardPlugin() override;
bool receivePacket(const NetworkPacket &np) override; bool receivePacket(const NetworkPacket &np) override;
QString dbusPath() const override; QString dbusPath() const override;

View file

@ -26,10 +26,6 @@ RemoteSystemVolumePlugin::RemoteSystemVolumePlugin(QObject *parent, const QVaria
{ {
} }
RemoteSystemVolumePlugin::~RemoteSystemVolumePlugin()
{
}
bool RemoteSystemVolumePlugin::receivePacket(const NetworkPacket &np) bool RemoteSystemVolumePlugin::receivePacket(const NetworkPacket &np)
{ {
if (np.has(QStringLiteral("sinkList"))) { if (np.has(QStringLiteral("sinkList"))) {

View file

@ -23,7 +23,6 @@ class Q_DECL_EXPORT RemoteSystemVolumePlugin : public KdeConnectPlugin
public: public:
explicit RemoteSystemVolumePlugin(QObject *parent, const QVariantList &args); explicit RemoteSystemVolumePlugin(QObject *parent, const QVariantList &args);
~RemoteSystemVolumePlugin() override;
bool receivePacket(const NetworkPacket &np) override; bool receivePacket(const NetworkPacket &np) override;
void connected() override; void connected() override;

View file

@ -93,10 +93,6 @@ RunCommandConfig::RunCommandConfig(QObject *parent, const QVariantList &args)
m_entriesModel->setHorizontalHeaderLabels(QStringList() << i18n("Name") << i18n("Command")); m_entriesModel->setHorizontalHeaderLabels(QStringList() << i18n("Name") << i18n("Command"));
} }
RunCommandConfig::~RunCommandConfig()
{
}
void RunCommandConfig::exportCommands() void RunCommandConfig::exportCommands()
{ {
QString filePath = QFileDialog::getSaveFileName(widget(), i18n("Export Commands"), QDir::homePath(), QStringLiteral("JSON (*.json)")); QString filePath = QFileDialog::getSaveFileName(widget(), i18n("Export Commands"), QDir::homePath(), QStringLiteral("JSON (*.json)"));

View file

@ -17,7 +17,6 @@ class RunCommandConfig : public KdeConnectPluginKcm
Q_OBJECT Q_OBJECT
public: public:
RunCommandConfig(QObject *parent, const QVariantList &); RunCommandConfig(QObject *parent, const QVariantList &);
~RunCommandConfig() override;
public Q_SLOTS: public Q_SLOTS:
void save() override; void save() override;

View file

@ -37,10 +37,6 @@ RunCommandPlugin::RunCommandPlugin(QObject *parent, const QVariantList &args)
connect(config(), &KdeConnectPluginConfig::configChanged, this, &RunCommandPlugin::configChanged); connect(config(), &KdeConnectPluginConfig::configChanged, this, &RunCommandPlugin::configChanged);
} }
RunCommandPlugin::~RunCommandPlugin()
{
}
bool RunCommandPlugin::receivePacket(const NetworkPacket &np) bool RunCommandPlugin::receivePacket(const NetworkPacket &np)
{ {
if (np.get<bool>(QStringLiteral("requestCommandList"), false)) { if (np.get<bool>(QStringLiteral("requestCommandList"), false)) {

View file

@ -22,7 +22,6 @@ class Q_DECL_EXPORT RunCommandPlugin : public KdeConnectPlugin
public: public:
explicit RunCommandPlugin(QObject *parent, const QVariantList &args); explicit RunCommandPlugin(QObject *parent, const QVariantList &args);
~RunCommandPlugin() override;
bool receivePacket(const NetworkPacket &np) override; bool receivePacket(const NetworkPacket &np) override;
void connected() override; void connected() override;

View file

@ -21,10 +21,6 @@ NotifyingApplicationModel::NotifyingApplicationModel(QObject *parent)
{ {
} }
NotifyingApplicationModel::~NotifyingApplicationModel()
{
}
QVector<NotifyingApplication> NotifyingApplicationModel::apps() QVector<NotifyingApplication> NotifyingApplicationModel::apps()
{ {
return m_apps; return m_apps;

View file

@ -17,7 +17,6 @@ class NotifyingApplicationModel : public QAbstractTableModel
public: public:
explicit NotifyingApplicationModel(QObject *parent = nullptr); explicit NotifyingApplicationModel(QObject *parent = nullptr);
~NotifyingApplicationModel() override;
QVariant data(const QModelIndex &index, int role) const override; QVariant data(const QModelIndex &index, int role) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role) override; bool setData(const QModelIndex &index, const QVariant &value, int role) override;

View file

@ -25,10 +25,6 @@ SftpPlugin::SftpPlugin(QObject *parent, const QVariantList &args)
{ {
} }
SftpPlugin::~SftpPlugin()
{
}
bool SftpPlugin::startBrowsing() bool SftpPlugin::startBrowsing()
{ {
NetworkPacket np(PACKET_TYPE_SFTP_REQUEST, {{QStringLiteral("startBrowsing"), true}}); NetworkPacket np(PACKET_TYPE_SFTP_REQUEST, {{QStringLiteral("startBrowsing"), true}});

View file

@ -22,7 +22,6 @@ class SftpPlugin : public KdeConnectPlugin
public: public:
explicit SftpPlugin(QObject *parent, const QVariantList &args); explicit SftpPlugin(QObject *parent, const QVariantList &args);
~SftpPlugin() override;
bool receivePacket(const NetworkPacket &np) override; bool receivePacket(const NetworkPacket &np) override;
void connected() override void connected() override