Make keyClick safer for QWindows going away on presses or during wait
We already have similar logic in the QWidget variant. Pick-to: 6.3 6.2 Task-number: QTBUG-102253 Change-Id: Idf1e3474f3189909f1cba7d5dedc2cde12f1338e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
This commit is contained in:
parent
6569a4068b
commit
ca106e261e
@ -93,7 +93,10 @@ namespace QTest
|
||||
|
||||
|
||||
if (action == Click) {
|
||||
QPointer<QWindow> ptr(window);
|
||||
sendKeyEvent(Press, window, code, text, modifier, delay);
|
||||
if (!ptr)
|
||||
return;
|
||||
sendKeyEvent(Release, window, code, text, modifier, delay);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user