summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeitem.cpp
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-08-09 18:55:51 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-08-09 18:55:51 (GMT)
commit7f2540ad80f56ccb4d81b897d90581130e9b9e91 (patch)
tree1e1ff4c8f9846faddd58a8ff6d0810bdac7c6f20 /src/declarative/graphicsitems/qdeclarativeitem.cpp
parentf33359fb0c56fe88e0ae3c564b7847f90889eac2 (diff)
parent720f4ca0ec3b42a101ac24b2cf74cdc87d29eac9 (diff)
downloadQt-7f2540ad80f56ccb4d81b897d90581130e9b9e91.zip
Qt-7f2540ad80f56ccb4d81b897d90581130e9b9e91.tar.gz
Qt-7f2540ad80f56ccb4d81b897d90581130e9b9e91.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Conflicts: doc/src/declarative/declarativeui.qdoc doc/src/getting-started/gettingstartedqml.qdoc
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeitem.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 5b74129..ff05997 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -3196,8 +3196,7 @@ bool QDeclarativeItem::hasActiveFocus() const
{
Q_D(const QDeclarativeItem);
return focusItem() == this ||
- (d->flags & QGraphicsItem::ItemIsFocusScope && focusItem() != 0) ||
- (!parentItem() && focusItem() != 0);
+ (d->flags & QGraphicsItem::ItemIsFocusScope && focusItem() != 0);
}
/*!
@@ -3217,10 +3216,8 @@ bool QDeclarativeItem::hasActiveFocus() const
}
\endqml
- For the purposes of this property, the top level item in the scene
- is assumed to act like a focus scope, and to always have active focus
- when the scene has focus. On a practical level, that means the following
- QML will give active focus to \c input on startup.
+ For the purposes of this property, the scene as a whole is assumed to act like a focus scope.
+ On a practical level, that means the following QML will give active focus to \c input on startup.
\qml
Rectangle {
@@ -3246,7 +3243,7 @@ bool QDeclarativeItem::hasFocus() const
p = p->parentItem();
}
- return hasActiveFocus() ? true : (!QGraphicsItem::parentItem() ? true : false);
+ return hasActiveFocus();
}
/*! \internal */