diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-02-09 11:37:18 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-02-09 17:27:31 (GMT) |
commit | 5f1e62aba6c322d7f46c9fe370feca88bfcf517c (patch) | |
tree | ee2a5a7375d32a36479f4c1fa26f7e5a9e5416e9 | |
parent | 0bc45266e94067c7a76609f01f0ccae5023d8aa2 (diff) | |
download | Qt-5f1e62aba6c322d7f46c9fe370feca88bfcf517c.zip Qt-5f1e62aba6c322d7f46c9fe370feca88bfcf517c.tar.gz Qt-5f1e62aba6c322d7f46c9fe370feca88bfcf517c.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
(cherry picked from commit 33aa8f4a035c1ce9231b40844e6e0793205d12aa)
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 11 |
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: |