summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestresult.cpp
diff options
context:
space:
mode:
authorVladimir Belyavsky <belyavskyv@gmail.com>2022-05-14 17:23:17 +0300
committerVladimir Belyavsky <belyavskyv@gmail.com>2022-06-03 09:34:19 +0300
commit66bcb66a51b523fdb6dabefa6366abed17f3b06f (patch)
tree703cdbac71088c77afb9197ba20da19b6ca96cdd /src/testlib/qtestresult.cpp
parent4a8611a902cc85ca6f93394f9e18d343f41e4112 (diff)
Windows: fix crash on closing an app when native file dialog is opened
The crash was provoked by QThread::terminate() called for QWindowsDialogThread from QWindowsDialogHelperBase destructor. It's still not clear why terminating the thread here causes a crash, but normally we should avoid terminating a thread anyway. Current changes make several improvements to avoid terminating the thread. The main problem was that QWindowsDialogThread::run() was never returned. That's because QWindowsNativeFileDialogBase::close() was not called on QWindowsDialogHelperBase destruction. The second problem was that QWindowsNativeFileDialogBase::close() may still not close native file dialog because it was not able to find HWND for IFileDialog instance in some circumstances, so make this by more robust way. Fixes: QTBUG-93298 Pick-to: 6.3 Change-Id: I55c8cf664ae2cf7c41c8cce43a6bb88a2680bf14 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/testlib/qtestresult.cpp')
0 files changed, 0 insertions, 0 deletions