diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2017-09-18 11:49:52 +0200 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2017-09-19 11:53:55 +0000 |
commit | 58c14c4a7edcecdd9d58b682a9360c83e2274ec5 (patch) | |
tree | 7f600686e4dd92681bec09ac745a9dcd4425844b /src/platformsupport/input/evdevtouch | |
parent | 47c92fbb0b588b443cead18a5aad5a2b5ad9e4d7 (diff) |
Replace Q_NULLPTR with nullptr where possible
Remaining uses of Q_NULLPTR are in:
src/corelib/global/qcompilerdetection.h
(definition and documentation of Q_NULLPTR)
tests/manual/qcursor/qcursorhighdpi/main.cpp
(a test executable compilable both under Qt4 and Qt5)
Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/platformsupport/input/evdevtouch')
-rw-r--r-- | src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 18 | ||||
-rw-r--r-- | src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp index 8cce403b31..15e00cea82 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp @@ -190,9 +190,9 @@ static inline bool testBit(long bit, const long *array) #endif QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &device, const QString &spec, QObject *parent) - : QObject(parent), m_notify(Q_NULLPTR), m_fd(-1), d(Q_NULLPTR), m_device(Q_NULLPTR) + : QObject(parent), m_notify(nullptr), m_fd(-1), d(nullptr), m_device(nullptr) #if QT_CONFIG(mtdev) - , m_mtdev(Q_NULLPTR) + , m_mtdev(nullptr) #endif { setObjectName(QLatin1String("Evdev Touch Handler")); @@ -425,7 +425,7 @@ err: qErrnoWarning(errno, "evdevtouch: Could not read from input device"); if (errno == ENODEV) { // device got disconnected -> stop reading delete m_notify; - m_notify = Q_NULLPTR; + m_notify = nullptr; QT_CLOSE(m_fd); m_fd = -1; @@ -464,7 +464,7 @@ void QEvdevTouchScreenHandler::unregisterTouchDevice() delete m_device; } - m_device = Q_NULLPTR; + m_device = nullptr; } void QEvdevTouchScreenData::addTouchPoint(const Contact &contact, Qt::TouchPointStates *combinedStates) @@ -779,13 +779,13 @@ void QEvdevTouchScreenData::reportPoints() if (m_filtered) emit q->touchPointsUpdated(); else - QWindowSystemInterface::handleTouchEvent(Q_NULLPTR, q->touchDevice(), m_touchPoints); + QWindowSystemInterface::handleTouchEvent(nullptr, q->touchDevice(), m_touchPoints); } QEvdevTouchScreenHandlerThread::QEvdevTouchScreenHandlerThread(const QString &device, const QString &spec, QObject *parent) - : QDaemonThread(parent), m_device(device), m_spec(spec), m_handler(Q_NULLPTR), m_touchDeviceRegistered(false) + : QDaemonThread(parent), m_device(device), m_spec(spec), m_handler(nullptr), m_touchDeviceRegistered(false) , m_touchUpdatePending(false) - , m_filterWindow(Q_NULLPTR) + , m_filterWindow(nullptr) , m_touchRate(-1) { start(); @@ -810,7 +810,7 @@ void QEvdevTouchScreenHandlerThread::run() exec(); delete m_handler; - m_handler = Q_NULLPTR; + m_handler = nullptr; } bool QEvdevTouchScreenHandlerThread::isTouchDeviceRegistered() const @@ -951,7 +951,7 @@ void QEvdevTouchScreenHandlerThread::filterAndSendTouchPoints() m_filteredPoints = filteredPoints; - QWindowSystemInterface::handleTouchEvent(Q_NULLPTR, + QWindowSystemInterface::handleTouchEvent(nullptr, m_handler->touchDevice(), points); } diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h b/src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h index b93744815c..04e22e1b5e 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h @@ -75,7 +75,7 @@ class QEvdevTouchScreenHandler : public QObject Q_OBJECT public: - explicit QEvdevTouchScreenHandler(const QString &device, const QString &spec = QString(), QObject *parent = Q_NULLPTR); + explicit QEvdevTouchScreenHandler(const QString &device, const QString &spec = QString(), QObject *parent = nullptr); ~QEvdevTouchScreenHandler(); QTouchDevice *touchDevice() const; @@ -108,7 +108,7 @@ class QEvdevTouchScreenHandlerThread : public QDaemonThread { Q_OBJECT public: - explicit QEvdevTouchScreenHandlerThread(const QString &device, const QString &spec, QObject *parent = Q_NULLPTR); + explicit QEvdevTouchScreenHandlerThread(const QString &device, const QString &spec, QObject *parent = nullptr); ~QEvdevTouchScreenHandlerThread(); void run() override; |