diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-12-09 01:10:54 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-12-09 01:10:54 (GMT) |
commit | 6efa3aa2fb9694e3275fac7412f9f930c715c628 (patch) | |
tree | c6ac25ee98e0b1438385efe8bcbf435b9c0ed25a /src/declarative | |
parent | 58ae252e5555dc379b4ed500532bc51ff7bebc25 (diff) | |
parent | ec44803109910127657b214f4556651a9619430d (diff) | |
download | Qt-6efa3aa2fb9694e3275fac7412f9f930c715c628.zip Qt-6efa3aa2fb9694e3275fac7412f9f930c715c628.tar.gz Qt-6efa3aa2fb9694e3275fac7412f9f930c715c628.tar.bz2 |
Merge qtsoftware:qt/qt.git#4.7 into qtsoftware:qt/qt-qml.git#4.7
Conflicts:
src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeitem_p.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h index d8635b9..a36ee34 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem_p.h +++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h @@ -126,7 +126,7 @@ public: widthValid(false), heightValid(false), componentComplete(true), keepMouse(false), smooth(false), transformOriginDirty(true), doneEventPreHandler(false), keyHandler(0), - mWidth(0), mHeight(0), implicitWidth(0), implicitHeight(0) + mWidth(0), mHeight(0), implicitWidth(0), implicitHeight(0), hadSubFocusItem(false) { QGraphicsItemPrivate::acceptedMouseButtons = 0; isDeclarativeItem = 1; @@ -275,6 +275,8 @@ public: qreal implicitWidth; qreal implicitHeight; + bool hadSubFocusItem; + QPointF computeTransformOrigin() const; virtual void setPosHelper(const QPointF &pos) @@ -288,9 +290,11 @@ public: // Reimplemented from QGraphicsItemPrivate virtual void subFocusItemChange() { - if (flags & QGraphicsItem::ItemIsFocusScope || !parent) - emit q_func()->activeFocusChanged(subFocusItem != 0); + bool hasSubFocusItem = subFocusItem != 0; + if (((flags & QGraphicsItem::ItemIsFocusScope) || !parent) && hasSubFocusItem != hadSubFocusItem) + emit q_func()->activeFocusChanged(hasSubFocusItem); //see also QDeclarativeItemPrivate::focusChanged + hadSubFocusItem = hasSubFocusItem; } // Reimplemented from QGraphicsItemPrivate |