aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitem.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-01-07 16:19:53 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-07 16:19:53 +0100
commitc280d67864dbef12c490380c29e03d5b18c102f1 (patch)
treed144321f7dbe2911e2790459b61ef54a32b27d0b /src/quick/items/qquickitem.cpp
parenta65824f353300dedc8440c36a29d0fb6a2cb9662 (diff)
parent5d150f63e1a188414e4951c4b6e4c7c474d9b4e6 (diff)
Merge "Merge branch 'stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r--src/quick/items/qquickitem.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 2340da9b9f..6668cb72c5 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -3129,8 +3129,12 @@ void QQuickItem::inputMethodEvent(QInputMethodEvent *event)
void QQuickItem::focusInEvent(QFocusEvent * /*event*/)
{
#ifndef QT_NO_ACCESSIBILITY
- QAccessibleEvent ev(this, QAccessible::Focus);
- QAccessible::updateAccessibility(&ev);
+ if (QAccessible::isActive()) {
+ if (QObject *acc = QQuickAccessibleAttached::findAccessible(this)) {
+ QAccessibleEvent ev(acc, QAccessible::Focus);
+ QAccessible::updateAccessibility(&ev);
+ }
+ }
#endif
}
@@ -3202,6 +3206,7 @@ void QQuickItem::touchUngrabEvent()
// XXX todo
}
+#ifndef QT_NO_WHEELEVENT
/*!
This event handler can be reimplemented in a subclass to receive
wheel events for an item. The event information is provided by the
@@ -3211,6 +3216,7 @@ void QQuickItem::wheelEvent(QWheelEvent *event)
{
event->ignore();
}
+#endif
/*!
This event handler can be reimplemented in a subclass to receive touch
@@ -4100,11 +4106,13 @@ void QQuickItemPrivate::deliverMouseEvent(QMouseEvent *e)
}
}
+#ifndef QT_NO_WHEELEVENT
void QQuickItemPrivate::deliverWheelEvent(QWheelEvent *e)
{
Q_Q(QQuickItem);
q->wheelEvent(e);
}
+#endif
void QQuickItemPrivate::deliverTouchEvent(QTouchEvent *e)
{
@@ -5264,7 +5272,7 @@ void QQuickItem::setFlags(Flags flags)
{
Q_D(QQuickItem);
- if ((flags & ItemIsFocusScope) != (d->flags & ItemIsFocusScope)) {
+ if (int(flags & ItemIsFocusScope) != int(d->flags & ItemIsFocusScope)) {
if (flags & ItemIsFocusScope && !d->childItems.isEmpty() && d->window) {
qWarning("QQuickItem: Cannot set FocusScope once item has children and is in a window.");
flags &= ~ItemIsFocusScope;
@@ -5274,7 +5282,7 @@ void QQuickItem::setFlags(Flags flags)
}
}
- if ((flags & ItemClipsChildrenToShape ) != (d->flags & ItemClipsChildrenToShape))
+ if (int(flags & ItemClipsChildrenToShape) != int(d->flags & ItemClipsChildrenToShape))
d->dirty(QQuickItemPrivate::Clip);
d->flags = flags;