summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-28 12:39:38 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-28 12:59:44 (GMT)
commit2be1a64592aee5dfbaf7c9834e188d38c1c602e5 (patch)
tree5c13c170bfd1862f3e4ad74afb9f0586106478f3
parent109302b76a6c23492f5a431953bc2f536b1b1ab4 (diff)
downloadQt-2be1a64592aee5dfbaf7c9834e188d38c1c602e5.zip
Qt-2be1a64592aee5dfbaf7c9834e188d38c1c602e5.tar.gz
Qt-2be1a64592aee5dfbaf7c9834e188d38c1c602e5.tar.bz2
Fixed runtime warning in tst_QGraphicsProxyWidget::childPos.
ungrabKeyboard was called on an item without checking whether it was a keyboard grabber. Reviewed-by: bnilsen
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 7dbc996..7fd471b 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -673,8 +673,8 @@ void QGraphicsScenePrivate::removePopup(QGraphicsWidget *widget, bool itemIsDyin
if (focusItem && popupWidgets.isEmpty()) {
QFocusEvent event(QEvent::FocusIn, Qt::PopupFocusReason);
sendEvent(focusItem, &event);
- } else {
- ungrabKeyboard((QGraphicsItem *)widget, itemIsDying);
+ } else if (keyboardGrabberItems.contains(static_cast<QGraphicsItem *>(widget))) {
+ ungrabKeyboard(static_cast<QGraphicsItem *>(widget), itemIsDying);
}
if (!itemIsDying && widget->isVisible()) {
widget->hide();