tests: Port some QWindow based utils to Window::Ptr

So it doesn't depend on Qt
This commit is contained in:
Sergio Martins
2022-04-13 23:49:29 +01:00
parent 664798ee6e
commit 924b32b3c5
9 changed files with 39 additions and 9 deletions

View File

@@ -127,4 +127,14 @@ bool Platform_qt::tests_waitForEvent(std::shared_ptr<Window> window, QEvent::Typ
return tests_waitForEvent(windowqt->qtWindow(), type, timeout);
}
void Platform_qt::tests_sendEvent(View *view, QEvent *ev) const
{
qApp->sendEvent(view->asQObject(), ev);
}
void Platform_qt::tests_sendEvent(Window::Ptr window, QEvent *ev) const
{
qApp->sendEvent(static_cast<Window_qt *>(window.get())->qtWindow(), ev);
}
#endif