summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/mainwindowsnippet.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2025-08-15 08:56:29 -0700
committerThiago Macieira <thiago.macieira@intel.com>2025-08-19 11:10:13 -0700
commitf0019c51397e75c261777ef2d7c82a96037d9c7f (patch)
tree3f58253499cf4de3114b57e99940be5146c80f5b /src/widgets/doc/snippets/mainwindowsnippet.cpp
parentca01e54454ce53e4f6f08fa0798e7d0061d6d628 (diff)
QTest::qWaitFor*: capture the widget/window using QPointer
So we know if they get deleted before the waiting completes. This avoids a crash if we dereference a dangling pointer or an ABA coincidence in the case of qWaitForWindowFocused. There's currently no way to tell QTest::qWaitFor() that the condition will never become true, so this will result in a timeout. [ChangeLog][QtTest] Fixed a bug that would cause the qWaitForWindow* and qWaitForWidget* functions to crash or misbehave if the window or widget they were told to wait on was destroyed in the process of waiting for it to be shown/focused/activated/exposed. Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-136653 Change-Id: Idaef89fa55e869d6946afffd727653a1fee3770c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/widgets/doc/snippets/mainwindowsnippet.cpp')
0 files changed, 0 insertions, 0 deletions