summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwidget
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-02-09 11:37:18 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-02-09 17:01:22 (GMT)
commit33aa8f4a035c1ce9231b40844e6e0793205d12aa (patch)
treef0f37169c02cf4a3bdba334d2c3445ff55867186 /tests/auto/qwidget
parent0a9c7a44c6a9ca134c7a23a33a9285787a7a6d19 (diff)
downloadQt-33aa8f4a035c1ce9231b40844e6e0793205d12aa.zip
Qt-33aa8f4a035c1ce9231b40844e6e0793205d12aa.tar.gz
Qt-33aa8f4a035c1ce9231b40844e6e0793205d12aa.tar.bz2
Added qwidget test case which displays a native child widget
As of commit bc82db, show()ing a native child widget causes a panic on Symbian. The panic code (WSERV-10) indicates that Activate() is being called on an already-active graphics context. This test case reproduces the defect. Task-number: QTBUG-7960
Diffstat (limited to 'tests/auto/qwidget')
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 03eddee..b59017b 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -250,6 +250,7 @@ private slots:
#else
void persistentWinId();
#endif
+ void showNativeChild();
void qobject_castInDestroyedSlot();
void showHideEvent_data();
@@ -4586,6 +4587,16 @@ void tst_QWidget::persistentWinId()
}
#endif // Q_OS_SYMBIAN
+void tst_QWidget::showNativeChild()
+{
+ QWidget topLevel;
+ topLevel.setGeometry(0, 0, 100, 100);
+ QWidget child(&topLevel);
+ child.winId();
+ topLevel.show();
+ QTest::qWaitForWindowShown(&topLevel);
+}
+
class ShowHideEventWidget : public QWidget
{
public: