summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-07-14 13:53:23 +0200
committerFriedemann Kleint <Friedemann.Kleint@digia.com>2014-07-18 09:25:05 +0200
commita71e285133087714034f3c84a758980c85b3801e (patch)
treef5e01e2c6f1337b4e0c9ade7695de9ab6888e371 /src/widgets/kernel
parente2203163d9cd03165142d98fa9ba8aaf5a9c3085 (diff)
Ensure transient parents are top level widgets.
When a dialog was parented on a native child widget, its window handle was used as a transient parent. This confused QPlatformWindow::initialGeometry() among other things. Use top level window as is in Qt 4. Task-number: QTBUG-40195 Change-Id: Ic82adc276175f92adde825fb2551274351e41f30 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 70d274796b..5a4bd33672 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -138,7 +138,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
if (QWidget *nativeParent = q->nativeParentWidget()) {
if (nativeParent->windowHandle()) {
if (flags & Qt::Window) {
- win->setTransientParent(nativeParent->windowHandle());
+ win->setTransientParent(nativeParent->window()->windowHandle());
win->setParent(0);
} else {
win->setTransientParent(0);