diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-08-28 12:39:38 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-08-28 12:59:44 (GMT) |
commit | 2be1a64592aee5dfbaf7c9834e188d38c1c602e5 (patch) | |
tree | 5c13c170bfd1862f3e4ad74afb9f0586106478f3 | |
parent | 109302b76a6c23492f5a431953bc2f536b1b1ab4 (diff) | |
download | Qt-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.cpp | 4 |
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(); |