aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquickpointerdevicehandler.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-07-26 16:33:13 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-07-27 10:42:54 +0000
commit0e1f83dcade8cb6428513eea4452dcd500f9e486 (patch)
tree227c4848145b23fde12ad33d3bea3a60c04cb36e /src/quick/handlers/qquickpointerdevicehandler.cpp
parent447e2e024609a22fe052cf458c27efdef2e3d3eb (diff)
Fix PointerHandler constructors and destructors
- Constructors should take QQuickItem* not QObject* to be symmetric with the parentItem() accessor (and other code) which assumes its type - Use header initialization everywhere possible - Reorder variables to minimize padding (somewhat) - Remove empty destructor bodies (the compiler can write them) - Remove override and virtual from destructors in accordance with https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rh-override Change-Id: I682a53a803d65e29136bfaec3a5b534e975ecf30 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpointerdevicehandler.cpp')
-rw-r--r--src/quick/handlers/qquickpointerdevicehandler.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/quick/handlers/qquickpointerdevicehandler.cpp b/src/quick/handlers/qquickpointerdevicehandler.cpp
index dfea3ec02d..24b3dc4733 100644
--- a/src/quick/handlers/qquickpointerdevicehandler.cpp
+++ b/src/quick/handlers/qquickpointerdevicehandler.cpp
@@ -57,20 +57,16 @@ QT_BEGIN_NAMESPACE
An intermediate class (not registered as a QML type) for handlers which
allow filtering based on device type, pointer type, or keyboard modifiers.
*/
-QQuickPointerDeviceHandler::QQuickPointerDeviceHandler(QObject *parent)
+QQuickPointerDeviceHandler::QQuickPointerDeviceHandler(QQuickItem *parent)
: QQuickPointerHandler(*(new QQuickPointerDeviceHandlerPrivate), parent)
{
}
-QQuickPointerDeviceHandler::QQuickPointerDeviceHandler(QQuickPointerDeviceHandlerPrivate &dd, QObject *parent)
+QQuickPointerDeviceHandler::QQuickPointerDeviceHandler(QQuickPointerDeviceHandlerPrivate &dd, QQuickItem *parent)
: QQuickPointerHandler(dd, parent)
{
}
-QQuickPointerDeviceHandler::~QQuickPointerDeviceHandler()
-{
-}
-
QQuickPointerDevice::DeviceTypes QQuickPointerDeviceHandler::acceptedDevices() const
{
Q_D(const QQuickPointerDeviceHandler);