Revert "Reset QWidget's winId when backing window surface is destroyed"
This reverts commit a9246c7132
.
The QWidget machinery is way to fragile to reset the winId under the
feet of QWidget like that. We would potentially need to include all
the logic in QWidget::destroy. This also ties into the flow between
QtGui and QtWidgets during window closing, which is still unresolved.
Change-Id: I168048a63c89796398eb5331a80ce3e5c8d9a208
Fixes: QTBUG-76588
Task-number: QTBUG-69289
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
3c0ba6675b
commit
deac052a40
@ -9382,12 +9382,6 @@ bool QWidget::event(QEvent *event)
|
||||
d->renderToTextureReallyDirty = 1;
|
||||
#endif
|
||||
break;
|
||||
case QEvent::PlatformSurface: {
|
||||
auto surfaceEvent = static_cast<QPlatformSurfaceEvent*>(event);
|
||||
if (surfaceEvent->surfaceEventType() == QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed)
|
||||
d->setWinId(0);
|
||||
break;
|
||||
}
|
||||
#ifndef QT_NO_PROPERTIES
|
||||
case QEvent::DynamicPropertyChange: {
|
||||
const QByteArray &propName = static_cast<QDynamicPropertyChangeEvent *>(event)->propertyName();
|
||||
|
Loading…
Reference in New Issue
Block a user