summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeitem.cpp
diff options
context:
space:
mode:
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 */