Assert that QWidgetPrivate::create creates a window

Assert the expected side effect of createTLSysExtra, which might not
allocate a window, but must do so in this case (as we have already
returned if the QWidget is not a window).

Fixes static analyzer warning 2f3bbfe8addb586445e96f8906d6769e

Pick-to: 6.1
Change-Id: I4d5b8651b3510eff8e4a7b25889c0521ba6a4247
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
Volker Hilsheimer 2021-02-25 13:12:14 +01:00
parent 4da0060ca8
commit 8cc72e0f63
1 changed files with 1 additions and 0 deletions

View File

@ -1246,6 +1246,7 @@ void QWidgetPrivate::create()
// in case the extra was already valid.
if (!win) {
createTLSysExtra();
Q_ASSERT(topData()->window);
win = topData()->window;
}