Clean up use of virtual and override keywords
Only use virtual when actually virtual, to override just use override.
This commit is contained in:
parent
cc0fdacbf5
commit
596e4484f4
62 changed files with 157 additions and 155 deletions
|
@ -40,7 +40,7 @@ public:
|
||||||
enum PairStatus : bool { NotPaired, Paired };
|
enum PairStatus : bool { NotPaired, Paired };
|
||||||
|
|
||||||
DeviceLink(const QString& deviceId, LinkProvider* parent);
|
DeviceLink(const QString& deviceId, LinkProvider* parent);
|
||||||
virtual ~DeviceLink() { };
|
virtual ~DeviceLink() = default;
|
||||||
|
|
||||||
virtual QString name() = 0;
|
virtual QString name() = 0;
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,8 @@ class KDECONNECTCORE_EXPORT DownloadJob
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
DownloadJob(const QHostAddress &address, const QVariantMap &transferInfo);
|
DownloadJob(const QHostAddress &address, const QVariantMap &transferInfo);
|
||||||
~DownloadJob();
|
~DownloadJob() override;
|
||||||
void start() Q_DECL_OVERRIDE;
|
void start() override;
|
||||||
QSharedPointer<QIODevice> getPayload();
|
QSharedPointer<QIODevice> getPayload();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -43,16 +43,16 @@ public:
|
||||||
LanDeviceLink(const QString& deviceId, LinkProvider* parent, QSslSocket* socket, ConnectionStarted connectionSource);
|
LanDeviceLink(const QString& deviceId, LinkProvider* parent, QSslSocket* socket, ConnectionStarted connectionSource);
|
||||||
void reset(QSslSocket* socket, ConnectionStarted connectionSource);
|
void reset(QSslSocket* socket, ConnectionStarted connectionSource);
|
||||||
|
|
||||||
virtual QString name() Q_DECL_OVERRIDE;
|
QString name() override;
|
||||||
bool sendPackage(NetworkPackage& np) override;
|
bool sendPackage(NetworkPackage& np) override;
|
||||||
UploadJob* sendPayload(NetworkPackage& np);
|
UploadJob* sendPayload(NetworkPackage& np);
|
||||||
|
|
||||||
virtual void userRequestsPair() override;
|
void userRequestsPair() override;
|
||||||
virtual void userRequestsUnpair() override;
|
void userRequestsUnpair() override;
|
||||||
|
|
||||||
virtual void setPairStatus(PairStatus status) override;
|
void setPairStatus(PairStatus status) override;
|
||||||
|
|
||||||
virtual bool linkShouldBeKeptAlive() override;
|
bool linkShouldBeKeptAlive() override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void dataReceived();
|
void dataReceived();
|
||||||
|
|
|
@ -41,7 +41,7 @@ class KDECONNECTCORE_EXPORT LanLinkProvider
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LanLinkProvider(bool testMode = false);
|
LanLinkProvider(bool testMode = false);
|
||||||
~LanLinkProvider();
|
~LanLinkProvider() override;
|
||||||
|
|
||||||
QString name() override { return "LanLinkProvider"; }
|
QString name() override { return "LanLinkProvider"; }
|
||||||
int priority() override { return PRIORITY_HIGH; }
|
int priority() override { return PRIORITY_HIGH; }
|
||||||
|
@ -51,9 +51,9 @@ public:
|
||||||
void incomingPairPackage(DeviceLink* device, const NetworkPackage& np);
|
void incomingPairPackage(DeviceLink* device, const NetworkPackage& np);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual void onNetworkChange() override;
|
void onNetworkChange() override;
|
||||||
virtual void onStart() override;
|
void onStart() override;
|
||||||
virtual void onStop() override;
|
void onStop() override;
|
||||||
void connected();
|
void connected();
|
||||||
void encrypted();
|
void encrypted();
|
||||||
void connectError();
|
void connectError();
|
||||||
|
|
|
@ -39,13 +39,13 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
LanPairingHandler(DeviceLink* deviceLink);
|
LanPairingHandler(DeviceLink* deviceLink);
|
||||||
virtual ~LanPairingHandler() { }
|
~LanPairingHandler() override { }
|
||||||
|
|
||||||
virtual void packageReceived(const NetworkPackage& np) Q_DECL_OVERRIDE;
|
void packageReceived(const NetworkPackage& np) override;
|
||||||
virtual bool requestPairing() Q_DECL_OVERRIDE;
|
bool requestPairing() override;
|
||||||
virtual bool acceptPairing() Q_DECL_OVERRIDE;
|
bool acceptPairing() override;
|
||||||
virtual void rejectPairing() Q_DECL_OVERRIDE;
|
void rejectPairing() override;
|
||||||
virtual void unpair() Q_DECL_OVERRIDE;
|
void unpair() override;
|
||||||
|
|
||||||
bool isPairRequested() const { return m_status == Requested; }
|
bool isPairRequested() const { return m_status == Requested; }
|
||||||
bool isPaired() const { return m_status == Paired; }
|
bool isPaired() const { return m_status == Paired; }
|
||||||
|
|
|
@ -38,13 +38,13 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Server(QObject* parent = 0);
|
Server(QObject* parent = 0);
|
||||||
virtual ~Server() {}
|
~Server() override = default;
|
||||||
|
|
||||||
QSslSocket* nextPendingConnection() Q_DECL_OVERRIDE;
|
QSslSocket* nextPendingConnection() override;
|
||||||
bool hasPendingConnections() const Q_DECL_OVERRIDE;
|
bool hasPendingConnections() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void incomingConnection(qintptr socketDescriptor) Q_DECL_OVERRIDE;
|
void incomingConnection(qintptr socketDescriptor) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //KDECONNECT_SERVER_H
|
#endif //KDECONNECT_SERVER_H
|
||||||
|
|
|
@ -36,7 +36,7 @@ class UploadJob
|
||||||
public:
|
public:
|
||||||
explicit UploadJob(const QSharedPointer<QIODevice>& source, const QString& deviceId);
|
explicit UploadJob(const QSharedPointer<QIODevice>& source, const QString& deviceId);
|
||||||
|
|
||||||
virtual void start() override;
|
void start() override;
|
||||||
|
|
||||||
QVariantMap transferInfo();
|
QVariantMap transferInfo();
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
const static int PRIORITY_HIGH = 100; //eg: lan
|
const static int PRIORITY_HIGH = 100; //eg: lan
|
||||||
|
|
||||||
LinkProvider();
|
LinkProvider();
|
||||||
virtual ~LinkProvider() { }
|
~LinkProvider() override = default;
|
||||||
|
|
||||||
virtual QString name() = 0;
|
virtual QString name() = 0;
|
||||||
virtual int priority() = 0;
|
virtual int priority() = 0;
|
||||||
|
|
|
@ -32,11 +32,11 @@ class LoopbackDeviceLink
|
||||||
public:
|
public:
|
||||||
LoopbackDeviceLink(const QString& d, LoopbackLinkProvider* a);
|
LoopbackDeviceLink(const QString& d, LoopbackLinkProvider* a);
|
||||||
|
|
||||||
virtual QString name() override;
|
QString name() override;
|
||||||
virtual bool sendPackage(NetworkPackage& np) override;
|
bool sendPackage(NetworkPackage& np) override;
|
||||||
|
|
||||||
virtual void userRequestsPair() override { setPairStatus(Paired); }
|
void userRequestsPair() override { setPairStatus(Paired); }
|
||||||
virtual void userRequestsUnpair() override { setPairStatus(NotPaired); }
|
void userRequestsUnpair() override { setPairStatus(NotPaired); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -31,14 +31,14 @@ class LoopbackLinkProvider
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
LoopbackLinkProvider();
|
LoopbackLinkProvider();
|
||||||
~LoopbackLinkProvider();
|
~LoopbackLinkProvider() override;
|
||||||
|
|
||||||
QString name() override { return "LoopbackLinkProvider"; }
|
QString name() override { return "LoopbackLinkProvider"; }
|
||||||
int priority() override { return PRIORITY_LOW; }
|
int priority() override { return PRIORITY_LOW; }
|
||||||
|
|
||||||
virtual void onStart() override;
|
void onStart() override;
|
||||||
virtual void onStop() override;
|
void onStop() override;
|
||||||
virtual void onNetworkChange() override;
|
void onNetworkChange() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPointer<LoopbackDeviceLink> loopbackDeviceLink;
|
QPointer<LoopbackDeviceLink> loopbackDeviceLink;
|
||||||
|
|
|
@ -43,7 +43,7 @@ class KDECONNECTCORE_EXPORT PairingHandler : public QObject
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PairingHandler(DeviceLink* parent);
|
PairingHandler(DeviceLink* parent);
|
||||||
virtual ~PairingHandler() { }
|
~PairingHandler() override = default;
|
||||||
|
|
||||||
DeviceLink* deviceLink() const;
|
DeviceLink* deviceLink() const;
|
||||||
void setDeviceLink(DeviceLink* dl);
|
void setDeviceLink(DeviceLink* dl);
|
||||||
|
|
|
@ -42,7 +42,7 @@ class KDECONNECTCORE_EXPORT Daemon
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Daemon(QObject *parent, bool testMode = false);
|
explicit Daemon(QObject *parent, bool testMode = false);
|
||||||
~Daemon();
|
~Daemon() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the daemon.
|
* Returns the daemon.
|
||||||
|
|
|
@ -78,7 +78,7 @@ public:
|
||||||
*/
|
*/
|
||||||
Device(QObject* parent, const NetworkPackage& np, DeviceLink* dl);
|
Device(QObject* parent, const NetworkPackage& np, DeviceLink* dl);
|
||||||
|
|
||||||
virtual ~Device();
|
~Device() override;
|
||||||
|
|
||||||
QString id() const { return m_deviceId; }
|
QString id() const { return m_deviceId; }
|
||||||
QString name() const { return m_deviceName; }
|
QString name() const { return m_deviceName; }
|
||||||
|
@ -113,6 +113,7 @@ public:
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
///sends a @p np package to the device
|
///sends a @p np package to the device
|
||||||
|
///virtual for testing purposes.
|
||||||
virtual bool sendPackage(NetworkPackage& np);
|
virtual bool sendPackage(NetworkPackage& np);
|
||||||
|
|
||||||
//Dbus operations
|
//Dbus operations
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
* @p destination specifies where these contents should be stored
|
* @p destination specifies where these contents should be stored
|
||||||
*/
|
*/
|
||||||
FileTransferJob(const QSharedPointer<QIODevice>& origin, qint64 size, const QUrl &destination);
|
FileTransferJob(const QSharedPointer<QIODevice>& origin, qint64 size, const QUrl &destination);
|
||||||
virtual void start() Q_DECL_OVERRIDE;
|
void start() override;
|
||||||
QUrl destination() const { return mDestination; }
|
QUrl destination() const { return mDestination; }
|
||||||
void setOriginName(QString from) { mFrom = from; }
|
void setOriginName(QString from) { mFrom = from; }
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ private Q_SLOTS:
|
||||||
void doStart();
|
void doStart();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool doKill() Q_DECL_OVERRIDE;
|
bool doKill() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void startTransfer();
|
void startTransfer();
|
||||||
|
|
|
@ -38,7 +38,7 @@ class KDECONNECTCORE_EXPORT KdeConnectPlugin
|
||||||
|
|
||||||
public:
|
public:
|
||||||
KdeConnectPlugin(QObject* parent, const QVariantList& args);
|
KdeConnectPlugin(QObject* parent, const QVariantList& args);
|
||||||
virtual ~KdeConnectPlugin();
|
~KdeConnectPlugin() override;
|
||||||
|
|
||||||
const Device* device();
|
const Device* device();
|
||||||
Device const* device() const;
|
Device const* device() const;
|
||||||
|
|
|
@ -37,7 +37,7 @@ class KDECONNECTCORE_EXPORT KdeConnectPluginConfig : public QObject
|
||||||
|
|
||||||
public:
|
public:
|
||||||
KdeConnectPluginConfig(const QString& deviceId, const QString& pluginName);
|
KdeConnectPluginConfig(const QString& deviceId, const QString& pluginName);
|
||||||
~KdeConnectPluginConfig();
|
~KdeConnectPluginConfig() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A directory to store stuff for this device and plugin. It's private in the sense
|
* A directory to store stuff for this device and plugin. It's private in the sense
|
||||||
|
|
|
@ -41,7 +41,7 @@ public:
|
||||||
, m_nam(Q_NULLPTR)
|
, m_nam(Q_NULLPTR)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void askPairingConfirmation(PairingHandler* d) Q_DECL_OVERRIDE
|
void askPairingConfirmation(PairingHandler* d) override
|
||||||
{
|
{
|
||||||
KNotification* notification = new KNotification("pairingRequest");
|
KNotification* notification = new KNotification("pairingRequest");
|
||||||
notification->setIconName(QStringLiteral("dialog-information"));
|
notification->setIconName(QStringLiteral("dialog-information"));
|
||||||
|
@ -54,12 +54,12 @@ public:
|
||||||
notification->sendEvent();
|
notification->sendEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
void reportError(const QString & title, const QString & description) Q_DECL_OVERRIDE
|
void reportError(const QString & title, const QString & description) override
|
||||||
{
|
{
|
||||||
KNotification::event(KNotification::Error, title, description);
|
KNotification::event(KNotification::Error, title, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
QNetworkAccessManager* networkAccessManager() Q_DECL_OVERRIDE
|
QNetworkAccessManager* networkAccessManager() override
|
||||||
{
|
{
|
||||||
if (!m_nam) {
|
if (!m_nam) {
|
||||||
m_nam = new KIO::AccessManager(this);
|
m_nam = new KIO::AccessManager(this);
|
||||||
|
|
|
@ -35,7 +35,7 @@ class SendFileItemAction : public KAbstractFileItemActionPlugin
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
SendFileItemAction(QObject* parent, const QVariantList &args);
|
SendFileItemAction(QObject* parent, const QVariantList &args);
|
||||||
virtual QList< QAction* > actions(const KFileItemListProperties& fileItemInfos, QWidget* parentWidget) override;
|
QList< QAction* > actions(const KFileItemListProperties& fileItemInfos, QWidget* parentWidget) override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void sendFile();
|
void sendFile();
|
||||||
|
|
|
@ -45,7 +45,7 @@ class KDECONNECTINTERFACES_EXPORT DaemonDbusInterface
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit DaemonDbusInterface(QObject* parent = nullptr);
|
explicit DaemonDbusInterface(QObject* parent = nullptr);
|
||||||
virtual ~DaemonDbusInterface();
|
~DaemonDbusInterface() override;
|
||||||
|
|
||||||
static QString activatedService();
|
static QString activatedService();
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ class KDECONNECTINTERFACES_EXPORT DeviceDbusInterface
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DeviceDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
explicit DeviceDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||||
virtual ~DeviceDbusInterface();
|
~DeviceDbusInterface() override;
|
||||||
|
|
||||||
Q_SCRIPTABLE QString id() const;
|
Q_SCRIPTABLE QString id() const;
|
||||||
Q_SCRIPTABLE void pluginCall(const QString &plugin, const QString &method);
|
Q_SCRIPTABLE void pluginCall(const QString &plugin, const QString &method);
|
||||||
|
@ -81,7 +81,7 @@ class KDECONNECTINTERFACES_EXPORT DeviceBatteryDbusInterface
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit DeviceBatteryDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
explicit DeviceBatteryDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||||
virtual ~DeviceBatteryDbusInterface();
|
~DeviceBatteryDbusInterface() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class KDECONNECTINTERFACES_EXPORT DeviceNotificationsDbusInterface
|
class KDECONNECTINTERFACES_EXPORT DeviceNotificationsDbusInterface
|
||||||
|
@ -90,7 +90,7 @@ class KDECONNECTINTERFACES_EXPORT DeviceNotificationsDbusInterface
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit DeviceNotificationsDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
explicit DeviceNotificationsDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||||
virtual ~DeviceNotificationsDbusInterface();
|
~DeviceNotificationsDbusInterface() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class KDECONNECTINTERFACES_EXPORT NotificationDbusInterface
|
class KDECONNECTINTERFACES_EXPORT NotificationDbusInterface
|
||||||
|
@ -99,7 +99,7 @@ class KDECONNECTINTERFACES_EXPORT NotificationDbusInterface
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
NotificationDbusInterface(const QString& deviceId, const QString& notificationId, QObject* parent = nullptr);
|
NotificationDbusInterface(const QString& deviceId, const QString& notificationId, QObject* parent = nullptr);
|
||||||
virtual ~NotificationDbusInterface();
|
~NotificationDbusInterface() override;
|
||||||
|
|
||||||
QString notificationId() { return id; }
|
QString notificationId() { return id; }
|
||||||
private:
|
private:
|
||||||
|
@ -113,7 +113,7 @@ class KDECONNECTINTERFACES_EXPORT SftpDbusInterface
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit SftpDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
explicit SftpDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||||
virtual ~SftpDbusInterface();
|
~SftpDbusInterface() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class KDECONNECTINTERFACES_EXPORT MprisDbusInterface
|
class KDECONNECTINTERFACES_EXPORT MprisDbusInterface
|
||||||
|
@ -130,7 +130,7 @@ class KDECONNECTINTERFACES_EXPORT MprisDbusInterface
|
||||||
Q_PROPERTY(int position READ position WRITE setPosition NOTIFY propertiesChangedProxy)
|
Q_PROPERTY(int position READ position WRITE setPosition NOTIFY propertiesChangedProxy)
|
||||||
public:
|
public:
|
||||||
explicit MprisDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
explicit MprisDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||||
virtual ~MprisDbusInterface();
|
~MprisDbusInterface() override;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void propertiesChangedProxy();
|
void propertiesChangedProxy();
|
||||||
|
@ -152,7 +152,7 @@ class KDECONNECTINTERFACES_EXPORT LockDeviceDbusInterface
|
||||||
Q_PROPERTY(bool isLocked READ isLocked WRITE setIsLocked NOTIFY lockedChangedProxy)
|
Q_PROPERTY(bool isLocked READ isLocked WRITE setIsLocked NOTIFY lockedChangedProxy)
|
||||||
public:
|
public:
|
||||||
explicit LockDeviceDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
explicit LockDeviceDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||||
virtual ~LockDeviceDbusInterface();
|
~LockDeviceDbusInterface() override;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void lockedChangedProxy(bool isLocked);
|
void lockedChangedProxy(bool isLocked);
|
||||||
|
@ -164,7 +164,7 @@ class KDECONNECTINTERFACES_EXPORT FindMyPhoneDeviceDbusInterface
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit FindMyPhoneDeviceDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
explicit FindMyPhoneDeviceDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||||
virtual ~FindMyPhoneDeviceDbusInterface();
|
~FindMyPhoneDeviceDbusInterface() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class KDECONNECTINTERFACES_EXPORT RemoteCommandsDbusInterface
|
class KDECONNECTINTERFACES_EXPORT RemoteCommandsDbusInterface
|
||||||
|
|
|
@ -61,16 +61,16 @@ public:
|
||||||
Q_ENUM(StatusFilterFlag)
|
Q_ENUM(StatusFilterFlag)
|
||||||
|
|
||||||
explicit DevicesModel(QObject *parent = nullptr);
|
explicit DevicesModel(QObject *parent = nullptr);
|
||||||
virtual ~DevicesModel();
|
~DevicesModel() override;
|
||||||
|
|
||||||
void setDisplayFilter(int flags);
|
void setDisplayFilter(int flags);
|
||||||
int displayFilter() const;
|
int displayFilter() const;
|
||||||
|
|
||||||
virtual QVariant data(const QModelIndex& index, int role) const override;
|
QVariant data(const QModelIndex& index, int role) const override;
|
||||||
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||||
|
|
||||||
Q_SCRIPTABLE DeviceDbusInterface* getDevice(int row) const;
|
Q_SCRIPTABLE DeviceDbusInterface* getDevice(int row) const;
|
||||||
virtual QHash<int, QByteArray> roleNames() const override;
|
QHash<int, QByteArray> roleNames() const override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void deviceAdded(const QString& id);
|
void deviceAdded(const QString& id);
|
||||||
|
|
|
@ -31,9 +31,9 @@ class KDECONNECTINTERFACES_EXPORT DevicesSortProxyModel : public QSortFilterProx
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit DevicesSortProxyModel(DevicesModel* devicesModel = Q_NULLPTR);
|
explicit DevicesSortProxyModel(DevicesModel* devicesModel = Q_NULLPTR);
|
||||||
virtual bool lessThan(const QModelIndex& left, const QModelIndex& right) const override;
|
bool lessThan(const QModelIndex& left, const QModelIndex& right) const override;
|
||||||
virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override;
|
bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override;
|
||||||
virtual void setSourceModel(QAbstractItemModel *sourceModel) override;
|
void setSourceModel(QAbstractItemModel *sourceModel) override;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void sourceDataChanged();
|
void sourceDataChanged();
|
||||||
|
|
|
@ -48,18 +48,18 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit NotificationsModel(QObject* parent = nullptr);
|
explicit NotificationsModel(QObject* parent = nullptr);
|
||||||
virtual ~NotificationsModel();
|
~NotificationsModel() override;
|
||||||
|
|
||||||
QString deviceId() const;
|
QString deviceId() const;
|
||||||
void setDeviceId(const QString& deviceId);
|
void setDeviceId(const QString& deviceId);
|
||||||
|
|
||||||
virtual QVariant data(const QModelIndex& index, int role) const override;
|
QVariant data(const QModelIndex& index, int role) const override;
|
||||||
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||||
|
|
||||||
NotificationDbusInterface* getNotification(const QModelIndex& index) const;
|
NotificationDbusInterface* getNotification(const QModelIndex& index) const;
|
||||||
|
|
||||||
Q_INVOKABLE bool isAnyDimissable() const;
|
Q_INVOKABLE bool isAnyDimissable() const;
|
||||||
virtual QHash<int, QByteArray> roleNames() const override;
|
QHash<int, QByteArray> roleNames() const override;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void dismissAll();
|
void dismissAll();
|
||||||
|
|
|
@ -40,12 +40,12 @@ class KdeConnectKcm
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
KdeConnectKcm(QWidget *parent, const QVariantList&);
|
KdeConnectKcm(QWidget *parent, const QVariantList&);
|
||||||
virtual ~KdeConnectKcm();
|
~KdeConnectKcm() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void save();
|
void save() override;
|
||||||
virtual QSize sizeHint() const;
|
QSize sizeHint() const override;
|
||||||
virtual QSize minimumSizeHint() const;
|
QSize minimumSizeHint() const override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void deviceSelected(const QModelIndex& current);
|
void deviceSelected(const QModelIndex& current);
|
||||||
|
|
|
@ -39,7 +39,7 @@ class KDECONNECTPLUGINKCM_EXPORT KdeConnectPluginKcm
|
||||||
|
|
||||||
public:
|
public:
|
||||||
KdeConnectPluginKcm(QWidget* parent, const QVariantList& args, const QString& componentName);
|
KdeConnectPluginKcm(QWidget* parent, const QVariantList& args, const QString& componentName);
|
||||||
virtual ~KdeConnectPluginKcm();
|
~KdeConnectPluginKcm() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The device this kcm is instantiated for
|
* The device this kcm is instantiated for
|
||||||
|
|
|
@ -29,8 +29,8 @@ class KdeConnectDeclarativePlugin : public QQmlExtensionPlugin
|
||||||
|
|
||||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
|
||||||
|
|
||||||
virtual void registerTypes(const char* uri) override;
|
void registerTypes(const char* uri) override;
|
||||||
virtual void initializeEngine(QQmlEngine *engine, const char *uri) override;
|
void initializeEngine(QQmlEngine *engine, const char *uri) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // KDECONNECTDECLARATIVEPLUGIN_H
|
#endif // KDECONNECTDECLARATIVEPLUGIN_H
|
||||||
|
|
|
@ -19,7 +19,7 @@ public:
|
||||||
ObjectFactory(QObject* parent, Func1 f1) : QObject(parent), m_f0(nullptr), m_f1(f1), m_f2(nullptr) {}
|
ObjectFactory(QObject* parent, Func1 f1) : QObject(parent), m_f0(nullptr), m_f1(f1), m_f2(nullptr) {}
|
||||||
ObjectFactory(QObject* parent, Func2 f2) : QObject(parent), m_f0(nullptr), m_f1(nullptr), m_f2(f2) {}
|
ObjectFactory(QObject* parent, Func2 f2) : QObject(parent), m_f0(nullptr), m_f1(nullptr), m_f2(f2) {}
|
||||||
|
|
||||||
virtual ~ObjectFactory() {}
|
~ObjectFactory() override = default;
|
||||||
|
|
||||||
Q_INVOKABLE QObject* create() {
|
Q_INVOKABLE QObject* create() {
|
||||||
if (m_f0) return m_f0();
|
if (m_f0) return m_f0();
|
||||||
|
|
|
@ -28,7 +28,7 @@ class ProcessRunner : public QObject
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ProcessRunner(QObject *parent = nullptr);
|
explicit ProcessRunner(QObject *parent = nullptr);
|
||||||
~ProcessRunner();
|
~ProcessRunner() override;
|
||||||
|
|
||||||
Q_INVOKABLE void runKdeconnectKCM();
|
Q_INVOKABLE void runKdeconnectKCM();
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,7 +37,7 @@ class DBusAsyncResponse : public QObject
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DBusAsyncResponse(QObject* parent = nullptr);
|
explicit DBusAsyncResponse(QObject* parent = nullptr);
|
||||||
virtual ~DBusAsyncResponse() {};
|
~DBusAsyncResponse() override = default;
|
||||||
|
|
||||||
Q_INVOKABLE void setPendingCall(QVariant e);
|
Q_INVOKABLE void setPendingCall(QVariant e);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class BatteryDbusInterface
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit BatteryDbusInterface(const Device *device);
|
explicit BatteryDbusInterface(const Device *device);
|
||||||
virtual ~BatteryDbusInterface();
|
~BatteryDbusInterface() override;
|
||||||
|
|
||||||
Q_SCRIPTABLE int charge() const { return mCharge; }
|
Q_SCRIPTABLE int charge() const { return mCharge; }
|
||||||
Q_SCRIPTABLE bool isCharging() const { return mIsCharging; }
|
Q_SCRIPTABLE bool isCharging() const { return mIsCharging; }
|
||||||
|
|
|
@ -36,11 +36,11 @@ class BatteryPlugin
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit BatteryPlugin(QObject *parent, const QVariantList &args);
|
explicit BatteryPlugin(QObject *parent, const QVariantList &args);
|
||||||
virtual ~BatteryPlugin();
|
~BatteryPlugin() override;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
virtual void connected() override;
|
void connected() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Keep these values in sync with THRESHOLD* constants in
|
// Keep these values in sync with THRESHOLD* constants in
|
||||||
|
|
|
@ -38,8 +38,8 @@ public:
|
||||||
explicit ClipboardPlugin(QObject *parent, const QVariantList &args);
|
explicit ClipboardPlugin(QObject *parent, const QVariantList &args);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
virtual void connected() override { }
|
void connected() override { }
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void clipboardChanged(QClipboard::Mode mode);
|
void clipboardChanged(QClipboard::Mode mode);
|
||||||
|
|
|
@ -35,13 +35,13 @@ class FindMyPhonePlugin
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit FindMyPhonePlugin(QObject *parent, const QVariantList &args);
|
explicit FindMyPhonePlugin(QObject *parent, const QVariantList &args);
|
||||||
virtual ~FindMyPhonePlugin();
|
~FindMyPhonePlugin() override;
|
||||||
|
|
||||||
Q_SCRIPTABLE void ring();
|
Q_SCRIPTABLE void ring();
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual void connected();
|
void connected() override;
|
||||||
virtual bool receivePackage(const NetworkPackage& np);
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString dbusPath() const;
|
QString dbusPath() const;
|
||||||
|
|
|
@ -39,7 +39,7 @@ class Q_DECL_EXPORT LockDevicePlugin
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit LockDevicePlugin(QObject *parent, const QVariantList &args);
|
explicit LockDevicePlugin(QObject *parent, const QVariantList &args);
|
||||||
virtual ~LockDevicePlugin();
|
~LockDevicePlugin() override;
|
||||||
|
|
||||||
bool isLocked() const;
|
bool isLocked() const;
|
||||||
void setLocked(bool b);
|
void setLocked(bool b);
|
||||||
|
|
|
@ -44,10 +44,10 @@ class MousepadPlugin
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MousepadPlugin(QObject *parent, const QVariantList &args);
|
explicit MousepadPlugin(QObject *parent, const QVariantList &args);
|
||||||
virtual ~MousepadPlugin();
|
~MousepadPlugin() override;
|
||||||
|
|
||||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
virtual void connected() override { }
|
void connected() override { }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if HAVE_X11
|
#if HAVE_X11
|
||||||
|
|
|
@ -41,8 +41,8 @@ public:
|
||||||
explicit MprisControlPlugin(QObject *parent, const QVariantList &args);
|
explicit MprisControlPlugin(QObject *parent, const QVariantList &args);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
virtual void connected() override { }
|
void connected() override { }
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void propertiesChanged(const QString& propertyInterface, const QVariantMap& properties);
|
void propertiesChanged(const QString& propertyInterface, const QVariantMap& properties);
|
||||||
|
|
|
@ -43,7 +43,7 @@ class Q_DECL_EXPORT MprisRemotePlugin
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MprisRemotePlugin(QObject *parent, const QVariantList &args);
|
explicit MprisRemotePlugin(QObject *parent, const QVariantList &args);
|
||||||
virtual ~MprisRemotePlugin();
|
~MprisRemotePlugin() override;
|
||||||
|
|
||||||
long position() const;
|
long position() const;
|
||||||
int volume() const { return m_volume; }
|
int volume() const { return m_volume; }
|
||||||
|
@ -58,8 +58,8 @@ public:
|
||||||
void setPlayer(const QString& player);
|
void setPlayer(const QString& player);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np);
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
virtual void connected();
|
void connected() override;
|
||||||
|
|
||||||
void seek(int offset) const;
|
void seek(int offset) const;
|
||||||
void requestPlayerStatus();
|
void requestPlayerStatus();
|
||||||
|
|
|
@ -39,7 +39,7 @@ class Notification
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Notification(const NetworkPackage& np, const QString& iconPath, QObject* parent);
|
Notification(const NetworkPackage& np, const QString& iconPath, QObject* parent);
|
||||||
virtual ~Notification();
|
~Notification() override;
|
||||||
|
|
||||||
QString internalId() const { return mInternalId; }
|
QString internalId() const { return mInternalId; }
|
||||||
QString appName() const { return mAppName; }
|
QString appName() const { return mAppName; }
|
||||||
|
|
|
@ -40,7 +40,7 @@ class NotificationsDbusInterface
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit NotificationsDbusInterface(KdeConnectPlugin* plugin);
|
explicit NotificationsDbusInterface(KdeConnectPlugin* plugin);
|
||||||
virtual ~NotificationsDbusInterface();
|
~NotificationsDbusInterface() override;
|
||||||
|
|
||||||
void processPackage(const NetworkPackage& np);
|
void processPackage(const NetworkPackage& np);
|
||||||
void clearNotifications();
|
void clearNotifications();
|
||||||
|
|
|
@ -42,11 +42,11 @@ class NotificationsPlugin
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit NotificationsPlugin(QObject *parent, const QVariantList &args);
|
explicit NotificationsPlugin(QObject *parent, const QVariantList &args);
|
||||||
virtual ~NotificationsPlugin();
|
~NotificationsPlugin() override;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
virtual void connected() override;
|
void connected() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
NotificationsDbusInterface* notificationsDbusInterface;
|
NotificationsDbusInterface* notificationsDbusInterface;
|
||||||
|
|
|
@ -33,12 +33,12 @@ class PauseMusicConfig
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
PauseMusicConfig(QWidget *parent, const QVariantList&);
|
PauseMusicConfig(QWidget *parent, const QVariantList&);
|
||||||
virtual ~PauseMusicConfig();
|
~PauseMusicConfig() override;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual void save() override;
|
void save() override;
|
||||||
virtual void load() override;
|
void load() override;
|
||||||
virtual void defaults() override;
|
void defaults() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::PauseMusicConfigUi* m_ui;
|
Ui::PauseMusicConfigUi* m_ui;
|
||||||
|
|
|
@ -36,8 +36,8 @@ public:
|
||||||
explicit PauseMusicPlugin(QObject *parent, const QVariantList &args);
|
explicit PauseMusicPlugin(QObject *parent, const QVariantList &args);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
virtual void connected() override { }
|
void connected() override { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns 0 if not muted, 1 if muted or -1 if there was an error
|
* @returns 0 if not muted, 1 if muted or -1 if there was an error
|
||||||
|
|
|
@ -35,14 +35,14 @@ class Q_DECL_EXPORT PingPlugin
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PingPlugin(QObject *parent, const QVariantList &args);
|
explicit PingPlugin(QObject *parent, const QVariantList &args);
|
||||||
virtual ~PingPlugin();
|
~PingPlugin() override;
|
||||||
|
|
||||||
Q_SCRIPTABLE void sendPing();
|
Q_SCRIPTABLE void sendPing();
|
||||||
Q_SCRIPTABLE void sendPing(const QString& customMessage);
|
Q_SCRIPTABLE void sendPing(const QString& customMessage);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
virtual void connected() override;
|
void connected() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString dbusPath() const;
|
QString dbusPath() const;
|
||||||
|
|
|
@ -31,12 +31,12 @@ class RunCommandConfig
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
RunCommandConfig(QWidget *parent, const QVariantList&);
|
RunCommandConfig(QWidget *parent, const QVariantList&);
|
||||||
virtual ~RunCommandConfig();
|
~RunCommandConfig() override;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual void save() Q_DECL_OVERRIDE;
|
void save() override;
|
||||||
virtual void load() Q_DECL_OVERRIDE;
|
void load() override;
|
||||||
virtual void defaults() Q_DECL_OVERRIDE;
|
void defaults() override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void onDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
void onDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
||||||
|
|
|
@ -37,12 +37,12 @@ class Q_DECL_EXPORT RunCommandPlugin
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit RunCommandPlugin(QObject *parent, const QVariantList &args);
|
explicit RunCommandPlugin(QObject *parent, const QVariantList &args);
|
||||||
virtual ~RunCommandPlugin();
|
~RunCommandPlugin() override;
|
||||||
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np);
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
virtual void connected();
|
void connected() override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void configChanged();
|
void configChanged();
|
||||||
|
|
|
@ -32,11 +32,11 @@ class Q_DECL_EXPORT ScreensaverInhibitPlugin
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ScreensaverInhibitPlugin(QObject *parent, const QVariantList &args);
|
explicit ScreensaverInhibitPlugin(QObject *parent, const QVariantList &args);
|
||||||
virtual ~ScreensaverInhibitPlugin();
|
~ScreensaverInhibitPlugin() override;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
virtual void connected() override;
|
void connected() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint inhibitCookie;
|
uint inhibitCookie;
|
||||||
|
|
|
@ -32,7 +32,7 @@ class NotificationsListener : public QDBusAbstractAdaptor
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit NotificationsListener(KdeConnectPlugin* aPlugin);
|
explicit NotificationsListener(KdeConnectPlugin* aPlugin);
|
||||||
virtual ~NotificationsListener();
|
~NotificationsListener() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
KdeConnectPlugin* mPlugin;
|
KdeConnectPlugin* mPlugin;
|
||||||
|
|
|
@ -31,15 +31,15 @@ class NotifyingApplicationModel: public QAbstractTableModel
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit NotifyingApplicationModel(QObject *parent = nullptr);
|
explicit NotifyingApplicationModel(QObject *parent = nullptr);
|
||||||
virtual ~NotifyingApplicationModel();
|
~NotifyingApplicationModel() override;
|
||||||
|
|
||||||
virtual QVariant data(const QModelIndex& index, int role) const override;
|
QVariant data(const QModelIndex& index, int role) const override;
|
||||||
virtual bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||||
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||||
virtual int columnCount(const QModelIndex& parent = QModelIndex()) const override;
|
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||||
virtual Qt::ItemFlags flags(const QModelIndex & index) const override;
|
Qt::ItemFlags flags(const QModelIndex & index) const override;
|
||||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||||
virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
|
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
|
||||||
|
|
||||||
QVector<NotifyingApplication> apps();
|
QVector<NotifyingApplication> apps();
|
||||||
void clearApplications();
|
void clearApplications();
|
||||||
|
|
|
@ -35,12 +35,12 @@ class SendNotificationsConfig
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
SendNotificationsConfig(QWidget *parent, const QVariantList&);
|
SendNotificationsConfig(QWidget *parent, const QVariantList&);
|
||||||
virtual ~SendNotificationsConfig();
|
~SendNotificationsConfig() override;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual void save() override;
|
void save() override;
|
||||||
virtual void load() override;
|
void load() override;
|
||||||
virtual void defaults() override;
|
void defaults() override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void loadApplications();
|
void loadApplications();
|
||||||
|
|
|
@ -41,11 +41,11 @@ class SendNotificationsPlugin
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SendNotificationsPlugin(QObject *parent, const QVariantList &args);
|
explicit SendNotificationsPlugin(QObject *parent, const QVariantList &args);
|
||||||
virtual ~SendNotificationsPlugin();
|
~SendNotificationsPlugin() override;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
virtual void connected() override;
|
void connected() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
NotificationsListener* notificationsListener;
|
NotificationsListener* notificationsListener;
|
||||||
|
|
|
@ -35,7 +35,7 @@ class Mounter
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit Mounter(SftpPlugin *sftp);
|
explicit Mounter(SftpPlugin *sftp);
|
||||||
virtual ~Mounter();
|
~Mounter() override;
|
||||||
|
|
||||||
bool wait();
|
bool wait();
|
||||||
bool isMounted() const { return m_started; }
|
bool isMounted() const { return m_started; }
|
||||||
|
|
|
@ -36,7 +36,7 @@ class SftpPlugin
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SftpPlugin(QObject *parent, const QVariantList &args);
|
explicit SftpPlugin(QObject *parent, const QVariantList &args);
|
||||||
virtual ~SftpPlugin();
|
~SftpPlugin() override;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void packageReceived(const NetworkPackage& np);
|
void packageReceived(const NetworkPackage& np);
|
||||||
|
@ -44,8 +44,8 @@ Q_SIGNALS:
|
||||||
Q_SCRIPTABLE void unmounted();
|
Q_SCRIPTABLE void unmounted();
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
virtual void connected() override;
|
void connected() override;
|
||||||
|
|
||||||
Q_SCRIPTABLE void mount();
|
Q_SCRIPTABLE void mount();
|
||||||
Q_SCRIPTABLE void unmount();
|
Q_SCRIPTABLE void unmount();
|
||||||
|
|
|
@ -29,7 +29,7 @@ class AutoClosingQFile : public QFile
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit AutoClosingQFile(const QString &name);
|
explicit AutoClosingQFile(const QString &name);
|
||||||
qint64 readData(char* data, qint64 maxlen) Q_DECL_OVERRIDE {
|
qint64 readData(char* data, qint64 maxlen) override {
|
||||||
qint64 read = QFile::readData(data, maxlen);
|
qint64 read = QFile::readData(data, maxlen);
|
||||||
if (read == -1 || read == bytesAvailable()) {
|
if (read == -1 || read == bytesAvailable()) {
|
||||||
close();
|
close();
|
||||||
|
|
|
@ -33,12 +33,12 @@ class ShareConfig
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ShareConfig(QWidget *parent, const QVariantList&);
|
ShareConfig(QWidget *parent, const QVariantList&);
|
||||||
virtual ~ShareConfig();
|
~ShareConfig() override;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual void save() override;
|
void save() override;
|
||||||
virtual void load() override;
|
void load() override;
|
||||||
virtual void defaults() override;
|
void defaults() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::ShareConfigUi* m_ui;
|
Ui::ShareConfigUi* m_ui;
|
||||||
|
|
|
@ -40,8 +40,8 @@ public:
|
||||||
///Helper method, QDBus won't recognize QUrl
|
///Helper method, QDBus won't recognize QUrl
|
||||||
Q_SCRIPTABLE void shareUrl(const QString& url) { shareUrl(QUrl(url)); }
|
Q_SCRIPTABLE void shareUrl(const QString& url) { shareUrl(QUrl(url)); }
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
virtual void connected() override;
|
void connected() override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void finished(KJob*);
|
void finished(KJob*);
|
||||||
|
|
|
@ -24,7 +24,7 @@ public:
|
||||||
ConnectConnection(const QDBusConnection &dbusConnection,
|
ConnectConnection(const QDBusConnection &dbusConnection,
|
||||||
const QString &cmName, const QString &protocolName,
|
const QString &cmName, const QString &protocolName,
|
||||||
const QVariantMap ¶meters);
|
const QVariantMap ¶meters);
|
||||||
~ConnectConnection();
|
~ConnectConnection() override;
|
||||||
|
|
||||||
static Tp::SimpleStatusSpecMap getSimpleStatusSpecMap();
|
static Tp::SimpleStatusSpecMap getSimpleStatusSpecMap();
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ class KDEConnectTelepathyProtocol : public Tp::BaseProtocol
|
||||||
|
|
||||||
public:
|
public:
|
||||||
KDEConnectTelepathyProtocol(const QDBusConnection &dbusConnection, const QString &name);
|
KDEConnectTelepathyProtocol(const QDBusConnection &dbusConnection, const QString &name);
|
||||||
virtual ~KDEConnectTelepathyProtocol();
|
~KDEConnectTelepathyProtocol() override;
|
||||||
|
|
||||||
QString connectionManagerName() const;
|
QString connectionManagerName() const;
|
||||||
void setConnectionManagerName(const QString &newName);
|
void setConnectionManagerName(const QString &newName);
|
||||||
|
|
|
@ -25,7 +25,7 @@ class ConnectTextChannel : public Tp::BaseChannelTextType
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
static ConnectTextChannelPtr create(QObject *connection, Tp::BaseChannel *baseChannel, uint targetHandle, const QString &identifier);
|
static ConnectTextChannelPtr create(QObject *connection, Tp::BaseChannel *baseChannel, uint targetHandle, const QString &identifier);
|
||||||
virtual ~ConnectTextChannel();
|
~ConnectTextChannel() override;
|
||||||
|
|
||||||
QString sendMessageCallback(const Tp::MessagePartList &messageParts, uint flags, Tp::DBusError *error);
|
QString sendMessageCallback(const Tp::MessagePartList &messageParts, uint flags, Tp::DBusError *error);
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ public:
|
||||||
void connected() override {}
|
void connected() override {}
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void sendSms(const QString& phoneNumber, const QString& messageBody);
|
void sendSms(const QString& phoneNumber, const QString& messageBody);
|
||||||
|
|
|
@ -34,7 +34,7 @@ class SendSmsDialog : public QDialog
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SendSmsDialog(const QString& originalMessage, const QString& phoneNumber, const QString& contactName, QWidget *parent = nullptr);
|
explicit SendSmsDialog(const QString& originalMessage, const QString& phoneNumber, const QString& contactName, QWidget *parent = nullptr);
|
||||||
virtual QSize sizeHint() const override;
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void sendButtonClicked();
|
void sendButtonClicked();
|
||||||
|
|
|
@ -40,9 +40,10 @@ class TelephonyPlugin
|
||||||
public:
|
public:
|
||||||
explicit TelephonyPlugin(QObject *parent, const QVariantList &args);
|
explicit TelephonyPlugin(QObject *parent, const QVariantList &args);
|
||||||
|
|
||||||
|
bool receivePackage(const NetworkPackage& np) override;
|
||||||
|
void connected() override { }
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
|
||||||
virtual void connected() override { }
|
|
||||||
void sendMutePackage();
|
void sendMutePackage();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void reportError(const QString & title, const QString & description) Q_DECL_OVERRIDE
|
void reportError(const QString & title, const QString & description) override
|
||||||
{
|
{
|
||||||
qWarning() << "error:" << title << description;
|
qWarning() << "error:" << title << description;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ public:
|
||||||
d->acceptPairing();
|
d->acceptPairing();
|
||||||
}
|
}
|
||||||
|
|
||||||
QNetworkAccessManager* networkAccessManager() Q_DECL_OVERRIDE
|
QNetworkAccessManager* networkAccessManager() override
|
||||||
{
|
{
|
||||||
if (!m_nam) {
|
if (!m_nam) {
|
||||||
m_nam = new KIO::AccessManager(this);
|
m_nam = new KIO::AccessManager(this);
|
||||||
|
|
|
@ -45,7 +45,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~TestNotificationsPlugin() {};
|
~TestNotificationsPlugin() override = default;
|
||||||
|
|
||||||
// allow to access notificationsListener for testing:
|
// allow to access notificationsListener for testing:
|
||||||
NotificationsListener* getNotificationsListener() const
|
NotificationsListener* getNotificationsListener() const
|
||||||
|
@ -75,7 +75,7 @@ public:
|
||||||
, lastPackage(nullptr)
|
, lastPackage(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~TestDevice()
|
~TestDevice() override
|
||||||
{
|
{
|
||||||
delete lastPackage;
|
delete lastPackage;
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
virtual bool sendPackage(NetworkPackage& np) override
|
bool sendPackage(NetworkPackage& np) override
|
||||||
{
|
{
|
||||||
++sentPackages;
|
++sentPackages;
|
||||||
// copy package manually to allow for inspection (can't use copy-constructor)
|
// copy package manually to allow for inspection (can't use copy-constructor)
|
||||||
|
@ -115,7 +115,7 @@ public:
|
||||||
: NotificationsListener(aPlugin)
|
: NotificationsListener(aPlugin)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~TestedNotificationsListener()
|
~TestedNotificationsListener() override
|
||||||
{}
|
{}
|
||||||
|
|
||||||
QHash<QString, NotifyingApplication>& getApplications()
|
QHash<QString, NotifyingApplication>& getApplications()
|
||||||
|
|
Loading…
Reference in a new issue