summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-11-16 14:54:38 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-11-19 11:22:14 (GMT)
commit2053560922c37b68fa107417c0555a34492f70e5 (patch)
tree33a91ff54f3c3728d0759c1beeec1ff9909f446f /src
parent8e4b3acf5f162d0b71b5c00e37715cf77ed261af (diff)
downloadQt-2053560922c37b68fa107417c0555a34492f70e5.zip
Qt-2053560922c37b68fa107417c0555a34492f70e5.tar.gz
Qt-2053560922c37b68fa107417c0555a34492f70e5.tar.bz2
Fix tst_QGraphicsView::inputMethodSensitivity autotest
The problem was that the scene was not notified it lost the focus when it was disconnected from the view (with setScene) So when it got back the focus, nothing was updated because the scene thought it still had the focus. Reviewed-by: jasplin (cherry picked from commit c535df0f286826c5575ec00c7e4c3f811a73918b)
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 323f972..9443311 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -1517,6 +1517,8 @@ void QGraphicsView::setScene(QGraphicsScene *scene)
QEvent windowDeactivate(QEvent::WindowDeactivate);
QApplication::sendEvent(d->scene, &windowDeactivate);
}
+ if(hasFocus())
+ d->scene->clearFocus();
}
// Assign the new scene and update the contents (scrollbars, etc.)).