diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-08-05 04:36:57 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-08-05 04:38:13 (GMT) |
commit | eb8c7d19c98d547f89caa1b5866fd2b5e43b32bf (patch) | |
tree | 56656466ea742db7741fc9987d88b67375193e9f /src/declarative/graphicsitems | |
parent | 5a98d58c1ed78262c20b05aa178a92b4a1a097df (diff) | |
download | Qt-eb8c7d19c98d547f89caa1b5866fd2b5e43b32bf.zip Qt-eb8c7d19c98d547f89caa1b5866fd2b5e43b32bf.tar.gz Qt-eb8c7d19c98d547f89caa1b5866fd2b5e43b32bf.tar.bz2 |
Make sure onFocusChanged is correctly emitted for items in a FocusScope.
Task-number: QTBUG-12649
Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeitem.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 50998eb..5b74129 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -2406,18 +2406,7 @@ void QDeclarativeItemPrivate::focusChanged(bool flag) Q_Q(QDeclarativeItem); if (!(flags & QGraphicsItem::ItemIsFocusScope) && parent) emit q->activeFocusChanged(flag); //see also QDeclarativeItemPrivate::subFocusItemChange() - - bool inScope = false; - QGraphicsItem *p = parent; - while (p) { - if (p->flags() & QGraphicsItem::ItemIsFocusScope) { - inScope = true; - break; - } - p = p->parentItem(); - } - if (!inScope) - emit q->focusChanged(flag); + emit q->focusChanged(flag); } /*! \internal */ |