diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-06 08:07:16 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-06 08:07:39 (GMT) |
commit | 4b35a36ca088a79c1aac877d3259e8a981399ee9 (patch) | |
tree | fc233cc0f2aa9e6de91b9d95037d218327cc0cc9 /tests/auto/qwidget | |
parent | 1d9a18142eb19d5dde93b7e5c63f9be0e4caf896 (diff) | |
parent | 718013958724210915b24142c499154f751f0bac (diff) | |
download | Qt-4b35a36ca088a79c1aac877d3259e8a981399ee9.zip Qt-4b35a36ca088a79c1aac877d3259e8a981399ee9.tar.gz Qt-4b35a36ca088a79c1aac877d3259e8a981399ee9.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7
Conflicts:
src/gui/painting/qpainterpath.cpp
src/gui/text/qfontengine_ft.cpp
src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'tests/auto/qwidget')
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 35014c9..ff8e406 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -345,6 +345,7 @@ private slots: void immediateRepaintAfterInvalidateBuffer(); #endif void effectiveWinId(); + void effectiveWinId2(); void customDpi(); void customDpiProperty(); @@ -8482,6 +8483,30 @@ void tst_QWidget::effectiveWinId() QVERIFY(child.effectiveWinId()); } +void tst_QWidget::effectiveWinId2() +{ + QWidget parent; + + class MyWidget : public QWidget { + bool event(QEvent *e) + { + if (e->type() == QEvent::WinIdChange) { + // Shouldn't crash. + effectiveWinId(); + } + + return QWidget::event(e); + } + }; + + MyWidget child; + child.setParent(&parent); + parent.show(); + + child.setParent(0); + child.setParent(&parent); +} + class CustomWidget : public QWidget { public: |