aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquickpointerhandler.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2021-05-26 22:19:05 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2021-06-01 06:09:25 +0200
commitebfbdfdbbd025560971e3f744e29349ce44ef6c3 (patch)
tree5740c4385b1a9561ac737a7a1ead3f4466baa5a9 /src/quick/handlers/qquickpointerhandler.cpp
parent378f92e9a6c80445b489eb19a3e0f898db4aac42 (diff)
PointerHandler constructor: add to Item parent's list of handlers
Amends 2d1ec2f84953f93fb661d442cd4207e7f0198e4b to fix the other constructor and delegate to it. QQuickTapHandler(parent) -> QQuickSinglePointHandler(parent) -> QQuickPointerDeviceHandler(QQSinglePtHandlerPriv, parent) -> QQuickPointerHandler(priv, parent) so in the intended use case, this is the constructor that counts. Change-Id: I856b3825609fa7601b50f6a7a69c46563dc9a34f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpointerhandler.cpp')
-rw-r--r--src/quick/handlers/qquickpointerhandler.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/quick/handlers/qquickpointerhandler.cpp b/src/quick/handlers/qquickpointerhandler.cpp
index 9fc7f45b7c..c5524fc107 100644
--- a/src/quick/handlers/qquickpointerhandler.cpp
+++ b/src/quick/handlers/qquickpointerhandler.cpp
@@ -63,7 +63,12 @@ Q_LOGGING_CATEGORY(lcPointerHandlerActive, "qt.quick.handler.active")
*/
QQuickPointerHandler::QQuickPointerHandler(QQuickItem *parent)
- : QObject(*(new QQuickPointerHandlerPrivate), parent)
+ : QQuickPointerHandler(*(new QQuickPointerHandlerPrivate), parent)
+{
+}
+
+QQuickPointerHandler::QQuickPointerHandler(QQuickPointerHandlerPrivate &dd, QQuickItem *parent)
+ : QObject(dd, parent)
{
// When a handler is created in QML, the given parent is null, and we
// depend on QQuickItemPrivate::data_append() later when it's added to an
@@ -74,11 +79,6 @@ QQuickPointerHandler::QQuickPointerHandler(QQuickItem *parent)
QQuickItemPrivate::get(parent)->addPointerHandler(this);
}
-QQuickPointerHandler::QQuickPointerHandler(QQuickPointerHandlerPrivate &dd, QQuickItem *parent)
- : QObject(dd, parent)
-{
-}
-
QQuickPointerHandler::~QQuickPointerHandler()
{
QQuickItem *parItem = parentItem();