Fix rendering glitches when using native widgets in MDI subwindows
authorMiikka Heikkinen <miikka.heikkinen@digia.com>
Tue, 17 Jul 2012 13:35:38 +0000 (16:35 +0300)
committerQt by Nokia <qt-info@nokia.com>
Wed, 18 Jul 2012 13:07:32 +0000 (15:07 +0200)
commit150284198bae8e200c67087e993ee0c06b5dc901
tree92f25a92465517c336130846374c262f69807224
parent006b620ef9390e9396c69db74e31785b04a5d2d6
Fix rendering glitches when using native widgets in MDI subwindows

When mixing native and regular widgets in same QMdiArea, some
subwindows didn't properly get set native. This was because
when a native parentless widget was given a parent, it wouldn't
enforce native window on the new parent and its ancestors.
This happened because window flags were adjusted too late in
relation to createWinId() call in setParent_sys().
Fixed by moving the createWinId() call to its proper place.

Also removed some old Q_WS_* ifdeffing in QWidget::setParent() that
masked some native enforcement code.

Additionally removed few QEXPECT_FAILs from QWidget autotest now
that those cases work correctly.

Task-number: QTBUG-26424
Change-Id: Ib6f9d0531e5c7299e2c307734d49c81f1ffa9713
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
src/widgets/kernel/qwidget.cpp
src/widgets/kernel/qwidget_qpa.cpp
tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp