diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-04-11 14:56:22 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2012-04-11 16:05:03 +0200 |
commit | a896d4b39ec3d45ba708d9b36ea9c864b1df2136 (patch) | |
tree | 45cfe153cce6114c2c76c48dc0bdabde2a8cf3e3 /src/quick/items/qquickcanvas.cpp | |
parent | 24fb8dc27eddfdd62bd2c3a6e863cbf433762cd6 (diff) | |
parent | 65bfc35429e845cf6b76d58107360a1360a654fc (diff) |
Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
src/qml/debugger/qqmlprofilerservice_p.h
src/qml/qml/qqmlboundsignal.cpp
src/qml/qml/v4/qv4bindings.cpp
src/quick/items/qquickshadereffect.cpp
src/quick/particles/qquickcustomparticle.cpp
src/quick/qtquick2.cpp
Change-Id: Ia9c6517035ae912fa75e77473a452bd3383def56
Diffstat (limited to 'src/quick/items/qquickcanvas.cpp')
-rw-r--r-- | src/quick/items/qquickcanvas.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp index 2e2c8725aa..3f08c8f056 100644 --- a/src/quick/items/qquickcanvas.cpp +++ b/src/quick/items/qquickcanvas.cpp @@ -55,7 +55,6 @@ #include <private/qguiapplication_p.h> #include <QtGui/QInputMethod> -#include <QtGui/QCursor> #include <private/qabstractanimation_p.h> @@ -123,10 +122,12 @@ private: bool m_eventSent; }; +#ifndef QT_NO_ACCESSIBILITY QAccessibleInterface *QQuickCanvas::accessibleRoot() const { return QAccessible::queryAccessibleInterface(const_cast<QQuickCanvas*>(this)); } +#endif /* @@ -154,6 +155,10 @@ have a scope focused item), and the other items will have their focus cleared. // #define TOUCH_DEBUG // #define DIRTY_DEBUG +#ifdef FOCUS_DEBUG +void printFocusTree(QQuickItem *item, QQuickItem *scope = 0, int depth = 1); +#endif + QQuickItem::UpdatePaintNodeData::UpdatePaintNodeData() : transformNode(0) { @@ -952,7 +957,7 @@ bool QQuickCanvasPrivate::clearHover() if (hoverItems.isEmpty()) return false; - QPointF pos = QCursor::pos(); // ### refactor: q->mapFromGlobal(QCursor::pos()); + QPointF pos = QGuiApplicationPrivate::lastCursorPosition;; // ### refactor: q->mapFromGlobal(QCursor::pos()); bool accepted = false; foreach (QQuickItem* item, hoverItems) @@ -1087,8 +1092,12 @@ bool QQuickCanvasPrivate::deliverMouseEvent(QMouseEvent *event) QQuickMouseEventEx me(event->type(), transform.map(event->windowPos()), event->windowPos(), event->screenPos(), event->button(), event->buttons(), event->modifiers()); - if (QQuickMouseEventEx::extended(event)) - me.setVelocity(QQuickMouseEventEx::extended(event)->velocity()); + QQuickMouseEventEx *eventEx = QQuickMouseEventEx::extended(event); + if (eventEx) { + me.setVelocity(eventEx->velocity()); + me.setCapabilities(eventEx->capabilities()); + } + me.setTimestamp(event->timestamp()); me.accept(); q->sendEvent(mouseGrabberItem, &me); event->setAccepted(me.isAccepted()); |