Merge branch 'stable'

This commit is contained in:
Aleix Pol 2015-09-08 10:51:41 +02:00
commit 817fcbc9d6
43 changed files with 106 additions and 105 deletions

View file

@ -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:

View file

@ -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();

View file

@ -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();

View file

@ -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); }

View file

@ -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()));

View file

@ -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:

View file

@ -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;
};

View file

@ -33,12 +33,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:
QPointer<LoopbackDeviceLink> loopbackDeviceLink;

View file

@ -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

View file

@ -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

View file

@ -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();

View file

@ -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:

View file

@ -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];

View file

@ -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);

View file

@ -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);

View file

@ -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];

View file

@ -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();

View file

@ -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"),
@ -167,7 +167,7 @@ void KdeConnectKcm::deviceSelected(const QModelIndex& current)
pluginsConfigChanged();
if (!current.isValid()) {
currentDevice = NULL;
currentDevice = nullptr;
kcmUi->deviceInfo->setVisible(false);
return;
}
@ -175,7 +175,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;
@ -289,7 +289,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;

View file

@ -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

View file

@ -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

View file

@ -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:

View file

@ -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();

View file

@ -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;
}

View file

@ -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);

View file

@ -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

View file

@ -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);

View file

@ -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;
}
}

View file

@ -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);

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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 {

View file

@ -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;

View file

@ -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)
{

View file

@ -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;
}

View file

@ -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();

View file

@ -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;

View file

@ -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*);

View file

@ -65,10 +65,10 @@ KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
content = i18n("SMS from %1<br>%2", contactName, 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");
@ -107,7 +107,8 @@ bool TelephonyPlugin::receivePackage(const NetworkPackage& np)
} else {
KNotification* n = createNotification(np);
if (n != NULL) n->sendEvent();
if (n != nullptr) n->sendEvent();
}
return true;

View file

@ -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 Q_SLOTS:

View file

@ -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()));