diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-05-31 12:36:46 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-05-31 12:36:46 +0200 |
commit | 7db1f8fc0444787690a2d981988e174c58fe1750 (patch) | |
tree | 2750a2e3386b69a979baf81ba4ab18259f5b1eb6 /src/widgets | |
parent | 994b71253c92a8c89d31db9e90cb551f31725830 (diff) |
Fix QWidget::windowHandle().
The window member in extra should remain null for widgets
that do not have a native window. The change introduced
in an earlier commit is clearly wrong.
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qwidget_qpa.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp index 339e6d248e..685965442b 100644 --- a/src/widgets/kernel/qwidget_qpa.cpp +++ b/src/widgets/kernel/qwidget_qpa.cpp @@ -741,11 +741,8 @@ QWindow *QWidget::windowHandle() const { Q_D(const QWidget); QTLWExtra *extra = d->maybeTopData(); - if (extra) { - if (!extra->window) - const_cast<QWidgetPrivate *>(d)->createTLSysExtra(); + if (extra) return extra->window; - } return 0; } |