@@ -30,6 +30,8 @@
30#define ugDebug(params) ((void)0)
30#define ugDebug(params) ((void)0)
31#endif // TOUCHGATE_DEBUG
31#endif // TOUCHGATE_DEBUG
33TouchGate::TouchGate(QQuickItem *parent)
35TouchGate::TouchGate(QQuickItem *parent)
34 : QQuickItem(parent)
36 : QQuickItem(parent)
@@ -39,8 +41,8 @@ TouchGate::TouchGate(QQuickItem *parent)
40bool TouchGate::event(QEvent *e)
42bool TouchGate::event(QEvent *e)
42− if (e->type() == UG_PREPEND_NAMESPACE(TouchOwnershipEvent)::touchOwnershipEventType()) {
44+ if (e->type() == TouchOwnershipEvent::touchOwnershipEventType()) {
43− touchOwnershipEvent(static_cast<UG_PREPEND_NAMESPACE(TouchOwnershipEvent*)>(e));
45+ touchOwnershipEvent(static_cast<TouchOwnershipEvent*>(e));
44 return true;
46 return true;
46 return QQuickItem::event(e);
48 return QQuickItem::event(e);
@@ -62,7 +64,7 @@ void TouchGate::touchEvent(QTouchEvent *event)
62 Q_ASSERT(!m_touchInfoMap.contains(touchPoint.id()));
64 Q_ASSERT(!m_touchInfoMap.contains(touchPoint.id()));
63 m_touchInfoMap[touchPoint.id()].ownership = OwnershipRequested;
65 m_touchInfoMap[touchPoint.id()].ownership = OwnershipRequested;
64 m_touchInfoMap[touchPoint.id()].ended = false;
66 m_touchInfoMap[touchPoint.id()].ended = false;
65− UG_PREPEND_NAMESPACE(TouchRegistry)::instance()->requestTouchOwnership(touchPoint.id(), this);
67+ TouchRegistry::instance()->requestTouchOwnership(touchPoint.id(), this);
68 if (m_touchInfoMap.contains(touchPoint.id())) {
70 if (m_touchInfoMap.contains(touchPoint.id())) {
@@ -107,12 +109,12 @@ void TouchGate::itemChange(ItemChange change, const ItemChangeData &value)
108 if (change == QQuickItem::ItemSceneChange) {
110 if (change == QQuickItem::ItemSceneChange) {
109 if (value.window != nullptr) {
111 if (value.window != nullptr) {
110− value.window->installEventFilter(UG_PREPEND_NAMESPACE(TouchRegistry)::instance());
112+ value.window->installEventFilter(TouchRegistry::instance());
115−void TouchGate::touchOwnershipEvent(UG_PREPEND_NAMESPACE(TouchOwnershipEvent) *event)
117+void TouchGate::touchOwnershipEvent(TouchOwnershipEvent *event)
117 // TODO: Optimization: batch those actions as TouchOwnershipEvents
119 // TODO: Optimization: batch those actions as TouchOwnershipEvents
118 // might come one right after the other.
120 // might come one right after the other.