diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-11-11 13:34:15 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-11-11 13:36:02 (GMT) |
commit | 258e751b7f4c3ff5e44fdbd654ce45d0693934bf (patch) | |
tree | 4074f6d15090f5910fb60d6b63f4bab467a25b76 /src/gui/kernel/qwidget_s60.cpp | |
parent | 72c170b64056a59dce9f849a5789d2968071f7b9 (diff) | |
download | Qt-258e751b7f4c3ff5e44fdbd654ce45d0693934bf.zip Qt-258e751b7f4c3ff5e44fdbd654ce45d0693934bf.tar.gz Qt-258e751b7f4c3ff5e44fdbd654ce45d0693934bf.tar.bz2 |
Fix for assertion failure in in QWidget::grabMouse for Symbian.
Docs say: "Note that only visible widgets can grab mouse input.
If isVisible() returns false for a widget, that widget cannot call
grabMouse()."
qwidget_x11.cpp uses the similar condition in grabMouse as symbian
after this commit.
Task-number: QTBUG-5658
Reviewed-by: Jason Barron
Diffstat (limited to 'src/gui/kernel/qwidget_s60.cpp')
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 915d308..504a538 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1236,7 +1236,7 @@ void QWidget::releaseKeyboard() void QWidget::grabMouse() { - if (!qt_nograb()) { + if (isVisible() && !qt_nograb()) { if (QWidgetPrivate::mouseGrabber && QWidgetPrivate::mouseGrabber != this) QWidgetPrivate::mouseGrabber->releaseMouse(); Q_ASSERT(testAttribute(Qt::WA_WState_Created)); @@ -1253,7 +1253,7 @@ void QWidget::grabMouse() #ifndef QT_NO_CURSOR void QWidget::grabMouse(const QCursor &cursor) { - if (!qt_nograb()) { + if (isVisible() && !qt_nograb()) { if (QWidgetPrivate::mouseGrabber && QWidgetPrivate::mouseGrabber != this) QWidgetPrivate::mouseGrabber->releaseMouse(); Q_ASSERT(testAttribute(Qt::WA_WState_Created)); |