Remove unused default destructors

Overriding and defaulting them in the header doesn't make sense

For the dbus interfaces, we don't have any reasources to clean up or memory to be released. Meaning we can drop those lines too
This commit is contained in:
Alexander Lohnau 2023-07-28 09:20:18 +02:00 committed by Albert Vaca Cintora
parent 83888412a9
commit 46feeda0cb
12 changed files with 0 additions and 102 deletions

View file

@ -27,8 +27,6 @@ private:
MultiplexChannelState();
public:
~MultiplexChannelState() = default;
constexpr static int BUFFER_SIZE = 4096;
private:

View file

@ -19,7 +19,6 @@ class DeviceLink : public QObject
Q_OBJECT
public:
DeviceLink(const QString &deviceId, LinkProvider *parent);
~DeviceLink() override = default;
QString deviceId() const
{

View file

@ -19,7 +19,6 @@ class KDECONNECTCORE_EXPORT Server : public QTcpServer
public:
Server(QObject *parent = nullptr);
~Server() override = default;
QSslSocket *nextPendingConnection() override;
void close();

View file

@ -20,7 +20,6 @@ class KDECONNECTCORE_EXPORT LinkProvider : public QObject
public:
LinkProvider();
~LinkProvider() override = default;
virtual QString name() = 0;

View file

@ -20,7 +20,6 @@ public:
const static int pairingTimeoutMsec = 30 * 1000; // 30 seconds of timeout
PairingHandler(Device *parent, PairState initialState);
~PairingHandler() override = default;
void packetReceived(const NetworkPacket &np);

View file

@ -43,8 +43,6 @@ public:
{
}
~ObjectFactory() override = default;
Q_INVOKABLE QObject *create();
Q_INVOKABLE QObject *create(const QVariant &arg1);

View file

@ -40,7 +40,6 @@ class DBusAsyncResponse : public QObject
public:
explicit DBusAsyncResponse(QObject *parent = nullptr);
~DBusAsyncResponse() override = default;
Q_INVOKABLE void setPendingCall(QVariant e);

View file

@ -25,10 +25,6 @@ DaemonDbusInterface::DaemonDbusInterface(QObject *parent)
connect(this, &OrgKdeKdeconnectDaemonInterface::customDevicesChanged, this, &DaemonDbusInterface::customDevicesChangedProxy);
}
DaemonDbusInterface::~DaemonDbusInterface()
{
}
DeviceDbusInterface::DeviceDbusInterface(const QString &id, QObject *parent)
: OrgKdeKdeconnectDeviceInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + id,
@ -41,10 +37,6 @@ DeviceDbusInterface::DeviceDbusInterface(const QString &id, QObject *parent)
connect(this, &OrgKdeKdeconnectDeviceInterface::nameChanged, this, &DeviceDbusInterface::nameChangedProxy);
}
DeviceDbusInterface::~DeviceDbusInterface()
{
}
QString DeviceDbusInterface::id() const
{
return m_id;
@ -68,8 +60,6 @@ BatteryDbusInterface::BatteryDbusInterface(const QString &id, QObject *parent)
connect(this, &OrgKdeKdeconnectDeviceBatteryInterface::refreshed, this, &BatteryDbusInterface::refreshedProxy);
}
BatteryDbusInterface::~BatteryDbusInterface() = default;
ConnectivityReportDbusInterface::ConnectivityReportDbusInterface(const QString &id, QObject *parent)
: OrgKdeKdeconnectDeviceConnectivity_reportInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/connectivity_report"),
@ -79,8 +69,6 @@ ConnectivityReportDbusInterface::ConnectivityReportDbusInterface(const QString &
connect(this, &OrgKdeKdeconnectDeviceConnectivity_reportInterface::refreshed, this, &ConnectivityReportDbusInterface::refreshedProxy);
}
ConnectivityReportDbusInterface::~ConnectivityReportDbusInterface() = default;
DeviceNotificationsDbusInterface::DeviceNotificationsDbusInterface(const QString &id, QObject *parent)
: OrgKdeKdeconnectDeviceNotificationsInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/notifications"),
@ -89,10 +77,6 @@ DeviceNotificationsDbusInterface::DeviceNotificationsDbusInterface(const QString
{
}
DeviceNotificationsDbusInterface::~DeviceNotificationsDbusInterface()
{
}
NotificationDbusInterface::NotificationDbusInterface(const QString &deviceId, const QString &notificationId, QObject *parent)
: OrgKdeKdeconnectDeviceNotificationsNotificationInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/notifications/")
@ -103,10 +87,6 @@ NotificationDbusInterface::NotificationDbusInterface(const QString &deviceId, co
{
}
NotificationDbusInterface::~NotificationDbusInterface()
{
}
DeviceConversationsDbusInterface::DeviceConversationsDbusInterface(const QString &deviceId, QObject *parent)
: OrgKdeKdeconnectDeviceConversationsInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + deviceId,
@ -115,10 +95,6 @@ DeviceConversationsDbusInterface::DeviceConversationsDbusInterface(const QString
{
}
DeviceConversationsDbusInterface::~DeviceConversationsDbusInterface()
{
}
SftpDbusInterface::SftpDbusInterface(const QString &id, QObject *parent)
: OrgKdeKdeconnectDeviceSftpInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/sftp"),
@ -127,10 +103,6 @@ SftpDbusInterface::SftpDbusInterface(const QString &id, QObject *parent)
{
}
SftpDbusInterface::~SftpDbusInterface()
{
}
MprisDbusInterface::MprisDbusInterface(const QString &id, QObject *parent)
: OrgKdeKdeconnectDeviceMprisremoteInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/mprisremote"),
@ -140,10 +112,6 @@ MprisDbusInterface::MprisDbusInterface(const QString &id, QObject *parent)
connect(this, &OrgKdeKdeconnectDeviceMprisremoteInterface::propertiesChanged, this, &MprisDbusInterface::propertiesChangedProxy);
}
MprisDbusInterface::~MprisDbusInterface()
{
}
RemoteControlDbusInterface::RemoteControlDbusInterface(const QString &id, QObject *parent)
: OrgKdeKdeconnectDeviceRemotecontrolInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/remotecontrol"),
@ -152,10 +120,6 @@ RemoteControlDbusInterface::RemoteControlDbusInterface(const QString &id, QObjec
{
}
RemoteControlDbusInterface::~RemoteControlDbusInterface()
{
}
LockDeviceDbusInterface::LockDeviceDbusInterface(const QString &id, QObject *parent)
: OrgKdeKdeconnectDeviceLockdeviceInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + id + QStringLiteral("/lockdevice"),
@ -166,10 +130,6 @@ LockDeviceDbusInterface::LockDeviceDbusInterface(const QString &id, QObject *par
Q_ASSERT(isValid());
}
LockDeviceDbusInterface::~LockDeviceDbusInterface()
{
}
FindMyPhoneDeviceDbusInterface::FindMyPhoneDeviceDbusInterface(const QString &deviceId, QObject *parent)
: OrgKdeKdeconnectDeviceFindmyphoneInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/findmyphone"),
@ -178,10 +138,6 @@ FindMyPhoneDeviceDbusInterface::FindMyPhoneDeviceDbusInterface(const QString &de
{
}
FindMyPhoneDeviceDbusInterface::~FindMyPhoneDeviceDbusInterface()
{
}
RemoteCommandsDbusInterface::RemoteCommandsDbusInterface(const QString &deviceId, QObject *parent)
: OrgKdeKdeconnectDeviceRemotecommandsInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/remotecommands"),
@ -190,8 +146,6 @@ RemoteCommandsDbusInterface::RemoteCommandsDbusInterface(const QString &deviceId
{
}
RemoteCommandsDbusInterface::~RemoteCommandsDbusInterface() = default;
RemoteKeyboardDbusInterface::RemoteKeyboardDbusInterface(const QString &deviceId, QObject *parent)
: OrgKdeKdeconnectDeviceRemotekeyboardInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/remotekeyboard"),
@ -201,8 +155,6 @@ RemoteKeyboardDbusInterface::RemoteKeyboardDbusInterface(const QString &deviceId
connect(this, &OrgKdeKdeconnectDeviceRemotekeyboardInterface::remoteStateChanged, this, &RemoteKeyboardDbusInterface::remoteStateChanged);
}
RemoteKeyboardDbusInterface::~RemoteKeyboardDbusInterface() = default;
SmsDbusInterface::SmsDbusInterface(const QString &deviceId, QObject *parent)
: OrgKdeKdeconnectDeviceSmsInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/sms"),
@ -211,8 +163,6 @@ SmsDbusInterface::SmsDbusInterface(const QString &deviceId, QObject *parent)
{
}
SmsDbusInterface::~SmsDbusInterface() = default;
ShareDbusInterface::ShareDbusInterface(const QString &deviceId, QObject *parent)
: OrgKdeKdeconnectDeviceShareInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/share"),
@ -221,8 +171,6 @@ ShareDbusInterface::ShareDbusInterface(const QString &deviceId, QObject *parent)
{
}
ShareDbusInterface::~ShareDbusInterface() = default;
PhotoDbusInterface::PhotoDbusInterface(const QString &deviceId, QObject *parent)
: OrgKdeKdeconnectDevicePhotoInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/photo"),
@ -231,8 +179,6 @@ PhotoDbusInterface::PhotoDbusInterface(const QString &deviceId, QObject *parent)
{
}
PhotoDbusInterface::~PhotoDbusInterface() = default;
RemoteSystemVolumeDbusInterface::RemoteSystemVolumeDbusInterface(const QString &deviceId, QObject *parent)
: OrgKdeKdeconnectDeviceRemotesystemvolumeInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/remotesystemvolume"),
@ -249,10 +195,6 @@ BigscreenDbusInterface::BigscreenDbusInterface(const QString &deviceId, QObject
{
}
BigscreenDbusInterface::~BigscreenDbusInterface()
{
}
VirtualmonitorDbusInterface::VirtualmonitorDbusInterface(const QString &deviceId, QObject *parent)
: OrgKdeKdeconnectDeviceVirtualmonitorInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/virtualmonitor"),
@ -261,11 +203,6 @@ VirtualmonitorDbusInterface::VirtualmonitorDbusInterface(const QString &deviceId
{
}
VirtualmonitorDbusInterface::~VirtualmonitorDbusInterface()
{
}
#include <iostream>
ClipboardDbusInterface::ClipboardDbusInterface(const QString &deviceId, QObject *parent)
: OrgKdeKdeconnectDeviceClipboardInterface(DaemonDbusInterface::activatedService(),
QStringLiteral("/modules/kdeconnect/devices/") + deviceId + QStringLiteral("/clipboard"),
@ -275,8 +212,4 @@ ClipboardDbusInterface::ClipboardDbusInterface(const QString &deviceId, QObject
connect(this, &OrgKdeKdeconnectDeviceClipboardInterface::autoShareDisabledChanged, this, &ClipboardDbusInterface::autoShareDisabledChangedProxy);
}
ClipboardDbusInterface::~ClipboardDbusInterface()
{
}
#include "moc_dbusinterfaces.cpp"

View file

@ -41,7 +41,6 @@ class KDECONNECTINTERFACES_EXPORT DaemonDbusInterface : public OrgKdeKdeconnectD
Q_PROPERTY(QStringList customDevices READ customDevices WRITE setCustomDevices NOTIFY customDevicesChangedProxy)
public:
explicit DaemonDbusInterface(QObject *parent = nullptr);
~DaemonDbusInterface() override;
static QString activatedService();
@ -64,7 +63,6 @@ class KDECONNECTINTERFACES_EXPORT DeviceDbusInterface : public OrgKdeKdeconnectD
public:
explicit DeviceDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~DeviceDbusInterface() override;
Q_SCRIPTABLE QString id() const;
Q_SCRIPTABLE void pluginCall(const QString &plugin, const QString &method);
@ -85,7 +83,6 @@ class KDECONNECTINTERFACES_EXPORT BatteryDbusInterface : public OrgKdeKdeconnect
Q_PROPERTY(bool isCharging READ isCharging NOTIFY refreshedProxy)
public:
explicit BatteryDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~BatteryDbusInterface() override;
Q_SIGNALS:
void refreshedProxy(bool isCharging, int charge);
@ -98,7 +95,6 @@ class KDECONNECTINTERFACES_EXPORT ConnectivityReportDbusInterface : public OrgKd
Q_PROPERTY(int cellularNetworkStrength READ cellularNetworkStrength NOTIFY refreshedProxy)
public:
explicit ConnectivityReportDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~ConnectivityReportDbusInterface() override;
Q_SIGNALS:
void refreshedProxy(QString cellularNetworkType, int cellularNetworkStrength);
@ -109,7 +105,6 @@ class KDECONNECTINTERFACES_EXPORT DeviceNotificationsDbusInterface : public OrgK
Q_OBJECT
public:
explicit DeviceNotificationsDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~DeviceNotificationsDbusInterface() override;
};
class KDECONNECTINTERFACES_EXPORT NotificationDbusInterface : public OrgKdeKdeconnectDeviceNotificationsNotificationInterface
@ -117,7 +112,6 @@ class KDECONNECTINTERFACES_EXPORT NotificationDbusInterface : public OrgKdeKdeco
Q_OBJECT
public:
NotificationDbusInterface(const QString &deviceId, const QString &notificationId, QObject *parent = nullptr);
~NotificationDbusInterface() override;
QString notificationId()
{
@ -133,7 +127,6 @@ class KDECONNECTINTERFACES_EXPORT DeviceConversationsDbusInterface : public OrgK
Q_OBJECT
public:
explicit DeviceConversationsDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~DeviceConversationsDbusInterface() override;
};
class KDECONNECTINTERFACES_EXPORT SftpDbusInterface : public OrgKdeKdeconnectDeviceSftpInterface
@ -141,7 +134,6 @@ class KDECONNECTINTERFACES_EXPORT SftpDbusInterface : public OrgKdeKdeconnectDev
Q_OBJECT
public:
explicit SftpDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~SftpDbusInterface() override;
};
class KDECONNECTINTERFACES_EXPORT MprisDbusInterface : public OrgKdeKdeconnectDeviceMprisremoteInterface
@ -160,7 +152,6 @@ class KDECONNECTINTERFACES_EXPORT MprisDbusInterface : public OrgKdeKdeconnectDe
Q_PROPERTY(bool canSeek READ canSeek NOTIFY propertiesChangedProxy)
public:
explicit MprisDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~MprisDbusInterface() override;
Q_SIGNALS:
void propertiesChangedProxy();
@ -171,7 +162,6 @@ class KDECONNECTINTERFACES_EXPORT RemoteControlDbusInterface : public OrgKdeKdec
Q_OBJECT
public:
explicit RemoteControlDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~RemoteControlDbusInterface() override;
};
class KDECONNECTINTERFACES_EXPORT LockDeviceDbusInterface : public OrgKdeKdeconnectDeviceLockdeviceInterface
@ -180,7 +170,6 @@ class KDECONNECTINTERFACES_EXPORT LockDeviceDbusInterface : public OrgKdeKdeconn
Q_PROPERTY(bool isLocked READ isLocked WRITE setIsLocked NOTIFY lockedChangedProxy)
public:
explicit LockDeviceDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~LockDeviceDbusInterface() override;
Q_SIGNALS:
void lockedChangedProxy(bool isLocked);
@ -191,7 +180,6 @@ class KDECONNECTINTERFACES_EXPORT FindMyPhoneDeviceDbusInterface : public OrgKde
Q_OBJECT
public:
explicit FindMyPhoneDeviceDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~FindMyPhoneDeviceDbusInterface() override;
};
class KDECONNECTINTERFACES_EXPORT RemoteCommandsDbusInterface : public OrgKdeKdeconnectDeviceRemotecommandsInterface
@ -201,7 +189,6 @@ class KDECONNECTINTERFACES_EXPORT RemoteCommandsDbusInterface : public OrgKdeKde
Q_PROPERTY(QString deviceId READ deviceId CONSTANT)
public:
explicit RemoteCommandsDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~RemoteCommandsDbusInterface() override;
};
class KDECONNECTINTERFACES_EXPORT RemoteKeyboardDbusInterface : public OrgKdeKdeconnectDeviceRemotekeyboardInterface
@ -210,7 +197,6 @@ class KDECONNECTINTERFACES_EXPORT RemoteKeyboardDbusInterface : public OrgKdeKde
Q_PROPERTY(bool remoteState READ remoteState NOTIFY remoteStateChanged)
public:
explicit RemoteKeyboardDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~RemoteKeyboardDbusInterface() override;
Q_SIGNALS:
void remoteStateChanged(bool state);
};
@ -220,7 +206,6 @@ class KDECONNECTINTERFACES_EXPORT SmsDbusInterface : public OrgKdeKdeconnectDevi
Q_OBJECT
public:
explicit SmsDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~SmsDbusInterface() override;
};
class KDECONNECTINTERFACES_EXPORT ShareDbusInterface : public OrgKdeKdeconnectDeviceShareInterface
@ -228,7 +213,6 @@ class KDECONNECTINTERFACES_EXPORT ShareDbusInterface : public OrgKdeKdeconnectDe
Q_OBJECT
public:
explicit ShareDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~ShareDbusInterface() override;
};
class KDECONNECTINTERFACES_EXPORT PhotoDbusInterface : public OrgKdeKdeconnectDevicePhotoInterface
@ -236,7 +220,6 @@ class KDECONNECTINTERFACES_EXPORT PhotoDbusInterface : public OrgKdeKdeconnectDe
Q_OBJECT
public:
explicit PhotoDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~PhotoDbusInterface() override;
};
class KDECONNECTINTERFACES_EXPORT RemoteSystemVolumeDbusInterface : public OrgKdeKdeconnectDeviceRemotesystemvolumeInterface
@ -246,7 +229,6 @@ class KDECONNECTINTERFACES_EXPORT RemoteSystemVolumeDbusInterface : public OrgKd
Q_PROPERTY(QString deviceId READ deviceId CONSTANT)
public:
explicit RemoteSystemVolumeDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~RemoteSystemVolumeDbusInterface() override = default;
};
class KDECONNECTINTERFACES_EXPORT BigscreenDbusInterface : public OrgKdeKdeconnectDeviceBigscreenInterface
@ -254,7 +236,6 @@ class KDECONNECTINTERFACES_EXPORT BigscreenDbusInterface : public OrgKdeKdeconne
Q_OBJECT
public:
explicit BigscreenDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~BigscreenDbusInterface() override;
};
class KDECONNECTINTERFACES_EXPORT VirtualmonitorDbusInterface : public OrgKdeKdeconnectDeviceVirtualmonitorInterface
@ -262,7 +243,6 @@ class KDECONNECTINTERFACES_EXPORT VirtualmonitorDbusInterface : public OrgKdeKde
Q_OBJECT
public:
explicit VirtualmonitorDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~VirtualmonitorDbusInterface() override;
};
class KDECONNECTINTERFACES_EXPORT ClipboardDbusInterface : public OrgKdeKdeconnectDeviceClipboardInterface
@ -271,7 +251,6 @@ class KDECONNECTINTERFACES_EXPORT ClipboardDbusInterface : public OrgKdeKdeconne
Q_PROPERTY(bool isAutoShareDisabled READ isAutoShareDisabled NOTIFY autoShareDisabledChangedProxy)
public:
explicit ClipboardDbusInterface(const QString &deviceId, QObject *parent = nullptr);
~ClipboardDbusInterface() override;
Q_SIGNALS:
void autoShareDisabledChangedProxy(bool b);
};

View file

@ -35,7 +35,6 @@ class MMTelephonyPlugin : public KdeConnectPlugin
public:
explicit MMTelephonyPlugin(QObject *parent, const QVariantList &args);
~MMTelephonyPlugin() override = default;
void receivePacket(const NetworkPacket &np) override;

View file

@ -36,7 +36,6 @@ class TelephonyPlugin : public KdeConnectPlugin
public:
explicit TelephonyPlugin(QObject *parent, const QVariantList &args);
~TelephonyPlugin() override = default;
void receivePacket(const NetworkPacket &np) override;
QString dbusPath() const override;

View file

@ -24,9 +24,6 @@ class SmsHelper : public QObject
{
Q_OBJECT
public:
SmsHelper() = default;
~SmsHelper() override = default;
static QObject *singletonProvider(QQmlEngine *engine, QJSEngine *scriptEngine);
enum CountryCode {