aboutsummaryrefslogtreecommitdiff
path: root/tests/ut_mwidget
diff options
context:
space:
mode:
authorAntti Kervinen <antti.kervinen@nokia.com>2010-09-08 15:09:26 +0300
committerDaniel d'Andrada <daniel.dandrada@nokia.com>2010-09-15 09:35:36 +0300
commitf2d26be44103107f9dda3a3f740d8b43a6357fb0 (patch)
treee17d1eb3479e7b073974097b7855ca96794abb62 /tests/ut_mwidget
parent9c97a8f71501df5005dece8c1280bcf9910b0e5f (diff)
Fixes: NB#190565 - displayEntered can be received by application page without visible window
RevBy: Daniel d'Andrada Details: MWidget::setVisible(true) fixed to check the visibility of the widget by calling isOnDisplay(). This is a bit slower than the previous implementation, but setVisible(true) is not called very frequently. Test added to MWidget unit test.
Diffstat (limited to 'tests/ut_mwidget')
-rw-r--r--tests/ut_mwidget/ut_mwidget.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ut_mwidget/ut_mwidget.cpp b/tests/ut_mwidget/ut_mwidget.cpp
index b1359171..fe82cce4 100644
--- a/tests/ut_mwidget/ut_mwidget.cpp
+++ b/tests/ut_mwidget/ut_mwidget.cpp
@@ -200,6 +200,15 @@ void Ut_MWidget::testShowHideSimple()
widget->hide();
QVERIFY(m_dummySlotCalled == true);
disconnect(widget, SIGNAL(displayExited()), this, SLOT(dummySlot()));
+
+ /* displayEntered() should not be emitted when show() is called
+ for an off-view widget */
+ widget->setGeometry(-500, -500, 50, 50);
+ m_dummySlotCalled = false;
+ connect(widget, SIGNAL(displayEntered()), this, SLOT(dummySlot()));
+ widget->show();
+ QVERIFY(m_dummySlotCalled == false);
+ disconnect(widget, SIGNAL(displayEntered()), this, SLOT(dummySlot()));
}
void Ut_MWidget::testShowHidePropagation()