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.
This commit is contained in:
Laszlo Agocs 2011-05-31 12:36:46 +02:00
parent 994b71253c
commit 7db1f8fc04

View File

@ -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;
}