summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-02-20 08:04:29 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-02-20 08:04:29 (GMT)
commit30b45ba2b11342a9e7cc06b68237b68a68955213 (patch)
tree1018c188375b3217b31abe9b7a0883ee1184a447 /src/gui/graphicsview/qgraphicsitem.cpp
parentce27cf24539e0c7971937e55d8539496ad51ee52 (diff)
parent8f10ca802dee1ed110f301191c4a56a85575033c (diff)
downloadQt-30b45ba2b11342a9e7cc06b68237b68a68955213.zip
Qt-30b45ba2b11342a9e7cc06b68237b68a68955213.tar.gz
Qt-30b45ba2b11342a9e7cc06b68237b68a68955213.tar.bz2
Merge remote branch 'origin/master' into qt-master-from-4.6
Conflicts: configure.exe src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index dd0c047..ca20101 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -3178,8 +3178,9 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim
*/
void QGraphicsItem::clearFocus()
{
- // Pass focus to the closest parent focus scope.
- if (!d_ptr->inDestructor) {
+ // Pass focus to the closest parent focus scope when clearing focus
+ // from a focus scope.
+ if (!d_ptr->inDestructor && (d_ptr->flags & ItemIsFocusScope)) {
QGraphicsItem *p = d_ptr->parent;
while (p) {
if (p->flags() & ItemIsFocusScope) {