run Clang Modernize
Minus the auto change
This commit is contained in:
parent
9ca9833e9c
commit
d58f6314fe
44 changed files with 107 additions and 107 deletions
|
@ -35,7 +35,7 @@ class DownloadJob
|
|||
Q_OBJECT
|
||||
public:
|
||||
DownloadJob(QHostAddress address, QVariantMap transferInfo);
|
||||
virtual void start();
|
||||
virtual void start() override;
|
||||
QSharedPointer<QIODevice> getPayload();
|
||||
|
||||
private:
|
||||
|
|
|
@ -37,8 +37,8 @@ class LanDeviceLink
|
|||
public:
|
||||
LanDeviceLink(const QString& deviceId, LinkProvider* parent, QTcpSocket* socket);
|
||||
|
||||
bool sendPackage(NetworkPackage& np);
|
||||
bool sendPackageEncrypted(QCA::PublicKey& key, NetworkPackage& np);
|
||||
bool sendPackage(NetworkPackage& np) override;
|
||||
bool sendPackageEncrypted(QCA::PublicKey& key, NetworkPackage& np) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void dataReceived();
|
||||
|
|
|
@ -37,13 +37,13 @@ public:
|
|||
LanLinkProvider();
|
||||
~LanLinkProvider();
|
||||
|
||||
QString name() { return "LanLinkProvider"; }
|
||||
int priority() { return PRIORITY_HIGH; }
|
||||
QString name() override { return "LanLinkProvider"; }
|
||||
int priority() override { return PRIORITY_HIGH; }
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual void onNetworkChange();
|
||||
virtual void onStart();
|
||||
virtual void onStop();
|
||||
virtual void onNetworkChange() override;
|
||||
virtual void onStart() override;
|
||||
virtual void onStop() override;
|
||||
void connected();
|
||||
void connectError();
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class SocketLineReader
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SocketLineReader(QTcpSocket* socket, QObject* parent = 0);
|
||||
explicit SocketLineReader(QTcpSocket* socket, QObject* parent = nullptr);
|
||||
|
||||
QByteArray readLine() { return mPackages.dequeue(); }
|
||||
qint64 write(const QByteArray& data) { return mSocket->write(data); }
|
||||
|
|
|
@ -29,7 +29,7 @@ UploadJob::UploadJob(const QSharedPointer<QIODevice>& source): KJob()
|
|||
{
|
||||
mInput = source;
|
||||
mServer = new QTcpServer(this);
|
||||
mSocket = 0;
|
||||
mSocket = nullptr;
|
||||
mPort = 0;
|
||||
|
||||
connect(mInput.data(), SIGNAL(readyRead()), this, SLOT(readyRead()));
|
||||
|
|
|
@ -35,7 +35,7 @@ class UploadJob
|
|||
Q_OBJECT
|
||||
public:
|
||||
explicit UploadJob(const QSharedPointer<QIODevice>& source);
|
||||
virtual void start();
|
||||
virtual void start() override;
|
||||
QVariantMap getTransferInfo();
|
||||
|
||||
private:
|
||||
|
|
|
@ -32,8 +32,8 @@ class LoopbackDeviceLink
|
|||
public:
|
||||
LoopbackDeviceLink(const QString& d, LoopbackLinkProvider* a);
|
||||
|
||||
virtual bool sendPackage(NetworkPackage& np);
|
||||
virtual bool sendPackageEncrypted(QCA::PublicKey& publicKey, NetworkPackage& np);
|
||||
virtual bool sendPackage(NetworkPackage& np) override;
|
||||
virtual bool sendPackageEncrypted(QCA::PublicKey& publicKey, NetworkPackage& np) override;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
LoopbackLinkProvider::LoopbackLinkProvider()
|
||||
: identityPackage(PACKAGE_TYPE_IDENTITY)
|
||||
{
|
||||
loopbackDeviceLink = 0;
|
||||
loopbackDeviceLink = nullptr;
|
||||
NetworkPackage::createIdentityPackage(&identityPackage);
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ void LoopbackLinkProvider::onStop()
|
|||
{
|
||||
if (loopbackDeviceLink) {
|
||||
delete loopbackDeviceLink;
|
||||
loopbackDeviceLink = 0;
|
||||
loopbackDeviceLink = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,12 +32,12 @@ public:
|
|||
LoopbackLinkProvider();
|
||||
~LoopbackLinkProvider();
|
||||
|
||||
QString name() { return "LoopbackLinkProvider"; }
|
||||
int priority() { return PRIORITY_LOW; }
|
||||
QString name() override { return "LoopbackLinkProvider"; }
|
||||
int priority() override { return PRIORITY_LOW; }
|
||||
|
||||
virtual void onStart();
|
||||
virtual void onStop();
|
||||
virtual void onNetworkChange();
|
||||
virtual void onStart() override;
|
||||
virtual void onStop() override;
|
||||
virtual void onNetworkChange() override;
|
||||
|
||||
private:
|
||||
LoopbackDeviceLink* loopbackDeviceLink;
|
||||
|
|
|
@ -37,7 +37,7 @@ KdeConnectPlugin::KdeConnectPlugin(QObject* parent, const QVariantList& args)
|
|||
d->mDevice = qvariant_cast< Device* >(args.at(0));
|
||||
d->mPluginName = args.at(1).toString();
|
||||
d->mOutgoingTypes = args.at(2).toStringList().toSet();
|
||||
d->mConfig = 0;
|
||||
d->mConfig = nullptr;
|
||||
}
|
||||
|
||||
KdeConnectPluginConfig* KdeConnectPlugin::config() const
|
||||
|
|
|
@ -58,8 +58,8 @@ void initializeTermHandlers(QCoreApplication* app, Daemon* daemon)
|
|||
sigemptyset(&action.sa_mask);
|
||||
action.sa_flags = 0;
|
||||
|
||||
sigaction(SIGTERM, &action, NULL);
|
||||
sigaction(SIGINT, &action, NULL);
|
||||
sigaction(SIGTERM, &action, nullptr);
|
||||
sigaction(SIGINT, &action, nullptr);
|
||||
}
|
||||
|
||||
class DesktopDaemon : public Daemon
|
||||
|
|
|
@ -35,7 +35,7 @@ class SendFileItemAction : public KAbstractFileItemActionPlugin
|
|||
Q_OBJECT
|
||||
public:
|
||||
SendFileItemAction(QObject* parent, const QVariantList &args);
|
||||
virtual QList< QAction* > actions(const KFileItemListProperties& fileItemInfos, QWidget* parentWidget);
|
||||
virtual QList< QAction* > actions(const KFileItemListProperties& fileItemInfos, QWidget* parentWidget) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void sendFile();
|
||||
|
|
|
@ -42,7 +42,7 @@ class KDECONNECTINTERFACES_EXPORT DaemonDbusInterface
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DaemonDbusInterface(QObject* parent = 0);
|
||||
explicit DaemonDbusInterface(QObject* parent = nullptr);
|
||||
virtual ~DaemonDbusInterface();
|
||||
|
||||
static QString activatedService();
|
||||
|
@ -57,7 +57,7 @@ class KDECONNECTINTERFACES_EXPORT DeviceDbusInterface
|
|||
Q_PROPERTY(bool isPaired READ isPaired NOTIFY pairingChangedProxy)
|
||||
|
||||
public:
|
||||
explicit DeviceDbusInterface(const QString& deviceId, QObject* parent = 0);
|
||||
explicit DeviceDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||
virtual ~DeviceDbusInterface();
|
||||
|
||||
Q_SCRIPTABLE QString id() const;
|
||||
|
@ -75,7 +75,7 @@ class KDECONNECTINTERFACES_EXPORT DeviceBatteryDbusInterface
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DeviceBatteryDbusInterface(const QString& deviceId, QObject* parent = 0);
|
||||
explicit DeviceBatteryDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||
virtual ~DeviceBatteryDbusInterface();
|
||||
};
|
||||
|
||||
|
@ -84,7 +84,7 @@ class KDECONNECTINTERFACES_EXPORT DeviceNotificationsDbusInterface
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DeviceNotificationsDbusInterface(const QString& deviceId, QObject* parent = 0);
|
||||
explicit DeviceNotificationsDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||
virtual ~DeviceNotificationsDbusInterface();
|
||||
};
|
||||
|
||||
|
@ -93,7 +93,7 @@ class KDECONNECTINTERFACES_EXPORT NotificationDbusInterface
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
NotificationDbusInterface(const QString& deviceId, const QString& notificationId, QObject* parent = 0);
|
||||
NotificationDbusInterface(const QString& deviceId, const QString& notificationId, QObject* parent = nullptr);
|
||||
virtual ~NotificationDbusInterface();
|
||||
};
|
||||
|
||||
|
@ -102,7 +102,7 @@ class KDECONNECTINTERFACES_EXPORT SftpDbusInterface
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SftpDbusInterface(const QString& deviceId, QObject* parent = 0);
|
||||
explicit SftpDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||
virtual ~SftpDbusInterface();
|
||||
};
|
||||
|
||||
|
@ -119,7 +119,7 @@ class KDECONNECTINTERFACES_EXPORT MprisDbusInterface
|
|||
Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY propertiesChangedProxy)
|
||||
Q_PROPERTY(int position READ position WRITE setPosition NOTIFY propertiesChangedProxy)
|
||||
public:
|
||||
explicit MprisDbusInterface(const QString& deviceId, QObject* parent = 0);
|
||||
explicit MprisDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||
virtual ~MprisDbusInterface();
|
||||
|
||||
Q_SIGNALS:
|
||||
|
@ -131,7 +131,7 @@ class KDECONNECTINTERFACES_EXPORT RemoteControlDbusInterface
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit RemoteControlDbusInterface(const QString& deviceId, QObject* parent = 0);
|
||||
explicit RemoteControlDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||
~RemoteControlDbusInterface() override;
|
||||
};
|
||||
|
||||
|
@ -141,7 +141,7 @@ class KDECONNECTINTERFACES_EXPORT LockDeviceDbusInterface
|
|||
Q_OBJECT
|
||||
Q_PROPERTY(bool isLocked READ isLocked WRITE setIsLocked NOTIFY lockedChangedProxy)
|
||||
public:
|
||||
explicit LockDeviceDbusInterface(const QString& deviceId, QObject* parent = 0);
|
||||
explicit LockDeviceDbusInterface(const QString& deviceId, QObject* parent = nullptr);
|
||||
virtual ~LockDeviceDbusInterface();
|
||||
|
||||
Q_SIGNALS:
|
||||
|
|
|
@ -267,7 +267,7 @@ QVariant DevicesModel::data(const QModelIndex& index, int role) const
|
|||
DeviceDbusInterface* DevicesModel::getDevice(int row) const
|
||||
{
|
||||
if (row < 0 || row >= m_deviceList.size()) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_deviceList[row];
|
||||
|
|
|
@ -57,17 +57,17 @@ public:
|
|||
Q_FLAGS(StatusFilterFlags)
|
||||
Q_ENUMS(StatusFilterFlag)
|
||||
|
||||
explicit DevicesModel(QObject *parent = 0);
|
||||
explicit DevicesModel(QObject *parent = nullptr);
|
||||
virtual ~DevicesModel();
|
||||
|
||||
void setDisplayFilter(int flags);
|
||||
int displayFilter() const;
|
||||
|
||||
virtual QVariant data(const QModelIndex& index, int role) const;
|
||||
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
|
||||
virtual QVariant data(const QModelIndex& index, int role) const override;
|
||||
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
|
||||
Q_SCRIPTABLE DeviceDbusInterface* getDevice(int row) const;
|
||||
virtual QHash<int, QByteArray> roleNames() const;
|
||||
virtual QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void deviceAdded(const QString& id);
|
||||
|
|
|
@ -31,9 +31,9 @@ class KDECONNECTINTERFACES_EXPORT DevicesSortProxyModel : public QSortFilterProx
|
|||
Q_OBJECT
|
||||
public:
|
||||
explicit DevicesSortProxyModel(DevicesModel* devicesModel = Q_NULLPTR);
|
||||
virtual bool lessThan(const QModelIndex& left, const QModelIndex& right) const;
|
||||
virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
|
||||
virtual void setSourceModel(QAbstractItemModel *sourceModel);
|
||||
virtual bool lessThan(const QModelIndex& left, const QModelIndex& right) const override;
|
||||
virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override;
|
||||
virtual void setSourceModel(QAbstractItemModel *sourceModel) override;
|
||||
|
||||
public Q_SLOTS:
|
||||
void sourceDataChanged(QModelIndex,QModelIndex);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
NotificationsModel::NotificationsModel(QObject* parent)
|
||||
: QAbstractListModel(parent)
|
||||
, m_dbusInterface(0)
|
||||
, m_dbusInterface(nullptr)
|
||||
{
|
||||
|
||||
//new ModelTest(this, this);
|
||||
|
@ -191,12 +191,12 @@ QVariant NotificationsModel::data(const QModelIndex& index, int role) const
|
|||
NotificationDbusInterface* NotificationsModel::getNotification(const QModelIndex& index) const
|
||||
{
|
||||
if (!index.isValid()) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int row = index.row();
|
||||
if (row < 0 || row >= m_notificationList.size()) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_notificationList[row];
|
||||
|
|
|
@ -47,19 +47,19 @@ public:
|
|||
DbusInterfaceRole,
|
||||
};
|
||||
|
||||
explicit NotificationsModel(QObject* parent = 0);
|
||||
explicit NotificationsModel(QObject* parent = nullptr);
|
||||
virtual ~NotificationsModel();
|
||||
|
||||
QString deviceId() const;
|
||||
void setDeviceId(const QString& deviceId);
|
||||
|
||||
virtual QVariant data(const QModelIndex& index, int role) const;
|
||||
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
|
||||
virtual QVariant data(const QModelIndex& index, int role) const override;
|
||||
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
|
||||
NotificationDbusInterface* getNotification(const QModelIndex& index) const;
|
||||
|
||||
Q_INVOKABLE bool isAnyDimissable() const;
|
||||
virtual QHash<int, QByteArray> roleNames() const;
|
||||
virtual QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
public Q_SLOTS:
|
||||
void dismissAll();
|
||||
|
|
|
@ -49,7 +49,7 @@ KdeConnectKcm::KdeConnectKcm(QWidget *parent, const QVariantList&)
|
|||
, kcmUi(new Ui::KdeConnectKcmUi())
|
||||
, daemon(new DaemonDbusInterface(this))
|
||||
, devicesModel(new DevicesModel(this))
|
||||
, currentDevice(0)
|
||||
, currentDevice(nullptr)
|
||||
{
|
||||
KAboutData *about = new KAboutData("kdeconnect-kcm",
|
||||
i18n("KDE Connect Settings"),
|
||||
|
@ -165,7 +165,7 @@ void KdeConnectKcm::deviceSelected(const QModelIndex& current)
|
|||
pluginsConfigChanged();
|
||||
|
||||
if (!current.isValid()) {
|
||||
currentDevice = NULL;
|
||||
currentDevice = nullptr;
|
||||
kcmUi->deviceInfo->setVisible(false);
|
||||
return;
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ void KdeConnectKcm::deviceSelected(const QModelIndex& current)
|
|||
currentIndex = sortProxyModel->mapToSource(current);
|
||||
currentDevice = devicesModel->getDevice(currentIndex.row());
|
||||
|
||||
bool valid = (currentDevice != NULL && currentDevice->isValid());
|
||||
bool valid = (currentDevice != nullptr && currentDevice->isValid());
|
||||
kcmUi->deviceInfo->setVisible(valid);
|
||||
if (!valid) {
|
||||
return;
|
||||
|
@ -274,7 +274,7 @@ void KdeConnectKcm::pluginsConfigChanged()
|
|||
if (!currentDevice) return;
|
||||
|
||||
DeviceDbusInterface* auxCurrentDevice = currentDevice;
|
||||
currentDevice = 0; //HACK to avoid infinite recursion (for some reason calling save on pluginselector emits changed)
|
||||
currentDevice = nullptr; //HACK to avoid infinite recursion (for some reason calling save on pluginselector emits changed)
|
||||
kcmUi->pluginSelector->save();
|
||||
currentDevice = auxCurrentDevice;
|
||||
|
||||
|
|
|
@ -37,11 +37,11 @@ class KioKdeconnect : public QObject, public KIO::SlaveBase
|
|||
public:
|
||||
KioKdeconnect(const QByteArray &pool, const QByteArray &app);
|
||||
|
||||
void get(const QUrl &url);
|
||||
void listDir(const QUrl &url);
|
||||
void stat(const QUrl &url);
|
||||
void get(const QUrl &url) override;
|
||||
void listDir(const QUrl &url) override;
|
||||
void stat(const QUrl &url) override;
|
||||
|
||||
void setHost(const QString &constHostname, quint16 port, const QString &user, const QString &pass);
|
||||
void setHost(const QString &constHostname, quint16 port, const QString &user, const QString &pass) override;
|
||||
|
||||
void listAllDevices(); //List all devices exported by m_dbusInterface
|
||||
void listDevice(); //List m_currentDevice
|
||||
|
|
|
@ -29,8 +29,8 @@ class KdeConnectDeclarativePlugin : public QQmlExtensionPlugin
|
|||
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
|
||||
|
||||
virtual void registerTypes(const char* uri);
|
||||
virtual void initializeEngine(QQmlEngine *engine, const char *uri);
|
||||
virtual void registerTypes(const char* uri) override;
|
||||
virtual void initializeEngine(QQmlEngine *engine, const char *uri) override;
|
||||
};
|
||||
|
||||
#endif // KDECONNECTDECLARATIVEPLUGIN_H
|
||||
|
|
|
@ -15,25 +15,25 @@ class ObjectFactory : public QObject
|
|||
typedef QObject* (*Func2)(QVariant, QVariant);
|
||||
|
||||
public:
|
||||
ObjectFactory(QObject* parent, Func0 f0) : QObject(parent), m_f0(f0), m_f1(0), m_f2(0) {}
|
||||
ObjectFactory(QObject* parent, Func1 f1) : QObject(parent), m_f0(0), m_f1(f1), m_f2(0) {}
|
||||
ObjectFactory(QObject* parent, Func2 f2) : QObject(parent), m_f0(0), m_f1(0), m_f2(f2) {}
|
||||
ObjectFactory(QObject* parent, Func0 f0) : QObject(parent), m_f0(f0), m_f1(nullptr), 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) {}
|
||||
|
||||
virtual ~ObjectFactory() {}
|
||||
|
||||
|
||||
Q_INVOKABLE QObject* create() {
|
||||
if (m_f0) return m_f0(); return 0;
|
||||
if (m_f0) return m_f0(); return nullptr;
|
||||
}
|
||||
|
||||
Q_INVOKABLE QObject* create(QVariant arg1) {
|
||||
if (m_f1) return m_f1(arg1);
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Q_INVOKABLE QObject* create(QVariant arg1, QVariant arg2) {
|
||||
if (m_f2) return m_f2(arg1, arg2);
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -27,7 +27,7 @@ class ProcessRunner : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ProcessRunner(QObject *parent = 0);
|
||||
explicit ProcessRunner(QObject *parent = nullptr);
|
||||
~ProcessRunner();
|
||||
|
||||
Q_INVOKABLE void runKdeconnectKCM();
|
||||
|
|
|
@ -11,7 +11,7 @@ Q_DECLARE_METATYPE(QDBusPendingReply<bool>)
|
|||
Q_DECLARE_METATYPE(QDBusPendingReply<int>)
|
||||
Q_DECLARE_METATYPE(QDBusPendingReply<QString>)
|
||||
|
||||
DBusResponseWaiter* DBusResponseWaiter::m_instance = 0;
|
||||
DBusResponseWaiter* DBusResponseWaiter::m_instance = nullptr;
|
||||
|
||||
DBusResponseWaiter* DBusResponseWaiter::instance()
|
||||
{
|
||||
|
@ -124,7 +124,7 @@ const QDBusPendingCall* DBusResponseWaiter::extractPendingCall(QVariant& variant
|
|||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class DBusAsyncResponse : public QObject
|
|||
Q_PROPERTY(bool autoDelete READ autodelete WRITE setAutodelete)
|
||||
|
||||
public:
|
||||
explicit DBusAsyncResponse(QObject* parent = 0);
|
||||
explicit DBusAsyncResponse(QObject* parent = nullptr);
|
||||
virtual ~DBusAsyncResponse() {};
|
||||
|
||||
Q_INVOKABLE void setPendingCall(QVariant e);
|
||||
|
|
|
@ -39,8 +39,8 @@ public:
|
|||
virtual ~BatteryPlugin();
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual bool receivePackage(const NetworkPackage& np);
|
||||
virtual void connected();
|
||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
||||
virtual void connected() override;
|
||||
|
||||
private:
|
||||
// Keep these values in sync with THRESHOLD* constants in
|
||||
|
|
|
@ -38,8 +38,8 @@ public:
|
|||
explicit ClipboardPlugin(QObject *parent, const QVariantList &args);
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual bool receivePackage(const NetworkPackage& np);
|
||||
virtual void connected() { }
|
||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
||||
virtual void connected() override { }
|
||||
|
||||
private Q_SLOTS:
|
||||
void clipboardChanged(QClipboard::Mode mode);
|
||||
|
|
|
@ -86,7 +86,7 @@ template <typename T, size_t N>
|
|||
size_t arraySize(T(&arr)[N]) { (void)arr; return N; }
|
||||
|
||||
MousepadPlugin::MousepadPlugin(QObject* parent, const QVariantList& args)
|
||||
: KdeConnectPlugin(parent, args), m_fakekey(0), m_x11(QX11Info::isPlatformX11())
|
||||
: KdeConnectPlugin(parent, args), m_fakekey(nullptr), m_x11(QX11Info::isPlatformX11())
|
||||
#if HAVE_WAYLAND
|
||||
, m_waylandInput(nullptr)
|
||||
, m_waylandAuthenticationRequested(false)
|
||||
|
@ -101,7 +101,7 @@ MousepadPlugin::~MousepadPlugin()
|
|||
{
|
||||
if (m_fakekey) {
|
||||
free(m_fakekey);
|
||||
m_fakekey = 0;
|
||||
m_fakekey = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,8 +48,8 @@ public:
|
|||
explicit MousepadPlugin(QObject *parent, const QVariantList &args);
|
||||
virtual ~MousepadPlugin();
|
||||
|
||||
virtual bool receivePackage(const NetworkPackage& np);
|
||||
virtual void connected() { }
|
||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
||||
virtual void connected() override { }
|
||||
|
||||
private:
|
||||
bool handlePackageX11(const NetworkPackage& np);
|
||||
|
|
|
@ -41,8 +41,8 @@ public:
|
|||
explicit MprisControlPlugin(QObject *parent, const QVariantList &args);
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual bool receivePackage(const NetworkPackage& np);
|
||||
virtual void connected() { }
|
||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
||||
virtual void connected() override { }
|
||||
|
||||
private Q_SLOTS:
|
||||
void propertiesChanged(const QString& propertyInterface, const QVariantMap& properties);
|
||||
|
|
|
@ -43,8 +43,8 @@ public:
|
|||
virtual ~NotificationsPlugin();
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual bool receivePackage(const NetworkPackage& np);
|
||||
virtual void connected();
|
||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
||||
virtual void connected() override;
|
||||
|
||||
private:
|
||||
NotificationsDbusInterface* notificationsDbusInterface;
|
||||
|
|
|
@ -36,9 +36,9 @@ public:
|
|||
virtual ~PauseMusicConfig();
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual void save();
|
||||
virtual void load();
|
||||
virtual void defaults();
|
||||
virtual void save() override;
|
||||
virtual void load() override;
|
||||
virtual void defaults() override;
|
||||
|
||||
private:
|
||||
Ui::PauseMusicConfigUi* m_ui;
|
||||
|
|
|
@ -36,8 +36,8 @@ public:
|
|||
explicit PauseMusicPlugin(QObject *parent, const QVariantList &args);
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual bool receivePackage(const NetworkPackage& np);
|
||||
virtual void connected() { }
|
||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
||||
virtual void connected() override { }
|
||||
|
||||
/**
|
||||
* @returns 0 if not muted, 1 if muted or -1 if there was an error
|
||||
|
|
|
@ -41,8 +41,8 @@ public:
|
|||
Q_SCRIPTABLE void sendPing(const QString& customMessage);
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual bool receivePackage(const NetworkPackage& np);
|
||||
virtual void connected();
|
||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
||||
virtual void connected() override;
|
||||
|
||||
private:
|
||||
QString dbusPath() const;
|
||||
|
|
|
@ -46,7 +46,7 @@ ScreensaverInhibitPlugin::ScreensaverInhibitPlugin(QObject* parent, const QVaria
|
|||
|
||||
QDBusMessage reply = inhibitInterface.call(INHIBIT_METHOD, "kdeconnect", "Phone is connected");
|
||||
|
||||
if (reply.errorMessage() != NULL) {
|
||||
if (reply.errorMessage() != nullptr) {
|
||||
qCDebug(KDECONNECT_PLUGIN_SCREENSAVERINHIBIT) << "Unable to inhibit the screensaver: " << reply.errorMessage();
|
||||
inhibitCookie = 0;
|
||||
} else {
|
||||
|
|
|
@ -35,8 +35,8 @@ public:
|
|||
virtual ~ScreensaverInhibitPlugin();
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual bool receivePackage(const NetworkPackage& np);
|
||||
virtual void connected();
|
||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
||||
virtual void connected() override;
|
||||
|
||||
private:
|
||||
uint inhibitCookie;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
Mounter::Mounter(SftpPlugin* sftp)
|
||||
: QObject(sftp)
|
||||
, m_sftp(sftp)
|
||||
, m_proc(0)
|
||||
, m_proc(nullptr)
|
||||
, m_mountPoint(sftp->mountPoint())
|
||||
, m_started(false)
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ static const QSet<QString> fields_c = QSet<QString>() << "ip" << "port" << "user
|
|||
|
||||
struct SftpPlugin::Pimpl
|
||||
{
|
||||
Pimpl() : mounter(0) {}
|
||||
Pimpl() : mounter(nullptr) {}
|
||||
|
||||
//Add KIO entry to Dolphin's Places
|
||||
KFilePlacesModel placesModel;
|
||||
|
@ -105,7 +105,7 @@ void SftpPlugin::unmount()
|
|||
if (m_d->mounter)
|
||||
{
|
||||
m_d->mounter->deleteLater();
|
||||
m_d->mounter = 0;
|
||||
m_d->mounter = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ bool SftpPlugin::startBrowsing()
|
|||
{
|
||||
if (mountAndWait()) {
|
||||
//return new KRun(QUrl::fromLocalFile(mountPoint()), 0);
|
||||
return new KRun(QUrl("kdeconnect://"+deviceId), 0);
|
||||
return new KRun(QUrl("kdeconnect://"+deviceId), nullptr);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -44,8 +44,8 @@ Q_SIGNALS:
|
|||
Q_SCRIPTABLE void unmounted();
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual bool receivePackage(const NetworkPackage& np);
|
||||
virtual void connected();
|
||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
||||
virtual void connected() override;
|
||||
|
||||
Q_SCRIPTABLE void mount();
|
||||
Q_SCRIPTABLE void unmount();
|
||||
|
|
|
@ -36,9 +36,9 @@ public:
|
|||
virtual ~ShareConfig();
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual void save();
|
||||
virtual void load();
|
||||
virtual void defaults();
|
||||
virtual void save() override;
|
||||
virtual void load() override;
|
||||
virtual void defaults() override;
|
||||
|
||||
private:
|
||||
Ui::ShareConfigUi* m_ui;
|
||||
|
|
|
@ -40,8 +40,8 @@ public:
|
|||
///Helper method, QDBus won't recognize QUrl
|
||||
Q_SCRIPTABLE void shareUrl(const QString& url) { shareUrl(QUrl(url)); }
|
||||
public Q_SLOTS:
|
||||
virtual bool receivePackage(const NetworkPackage& np);
|
||||
virtual void connected();
|
||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
||||
virtual void connected() override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void finished(KJob*);
|
||||
|
|
|
@ -64,10 +64,10 @@ KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
|
|||
content = i18n("SMS from %1<br>%2", phoneNumber, messageBody);
|
||||
flags = KNotification::Persistent;
|
||||
} else if (event == "talking") {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} else {
|
||||
#ifndef NDEBUG
|
||||
return NULL;
|
||||
return nullptr;
|
||||
#else
|
||||
type = QStringLiteral("callReceived");
|
||||
icon = QStringLiteral("phone");
|
||||
|
@ -103,7 +103,7 @@ bool TelephonyPlugin::receivePackage(const NetworkPackage& np)
|
|||
} else {
|
||||
|
||||
KNotification* n = createNotification(np);
|
||||
if (n != NULL) n->sendEvent();
|
||||
if (n != nullptr) n->sendEvent();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ public:
|
|||
explicit TelephonyPlugin(QObject *parent, const QVariantList &args);
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual bool receivePackage(const NetworkPackage& np);
|
||||
virtual void connected() { }
|
||||
virtual bool receivePackage(const NetworkPackage& np) override;
|
||||
virtual void connected() override { }
|
||||
void sendMutePackage();
|
||||
|
||||
private:
|
||||
|
|
|
@ -80,7 +80,7 @@ void TestSocketLineReader::socketLineReader()
|
|||
|
||||
QTcpSocket *sock = mServer->nextPendingConnection();
|
||||
|
||||
QVERIFY2(sock != 0, "Could not open a connection to the client");
|
||||
QVERIFY2(sock != nullptr, "Could not open a connection to the client");
|
||||
|
||||
mReader = new SocketLineReader(sock, this);
|
||||
connect(mReader, SIGNAL(readyRead()), SLOT(newPackage()));
|
||||
|
|
Loading…
Reference in a new issue