tst_NoQtEventLoop: destroy hidden windows
Otherwise, we get a warning: QWARN : tst_NoQtEventLoop::consumeSocketEvents() QWindowsContext::windowsProc: No Qt Window found for event 0x2a3 (WM_MOUSELEAVE), hwnd=0x0x9b80646. in the event loop which is running by another test. So, add missing 'delete' call. Change-Id: Ib9b24155bdd6e78062a5234c317c9f878906e413 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
9b14950ff6
commit
d55712153a
@ -258,8 +258,8 @@ void tst_NoQtEventLoop::consumeMouseEvents()
|
||||
|
||||
::SetWindowPos(mainWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
||||
|
||||
Window *childWindow = new Window;
|
||||
childWindow->setParent(QWindow::fromWinId((WId)mainWnd));
|
||||
QWindow *mainWindow = QWindow::fromWinId(reinterpret_cast<WId>(mainWnd));
|
||||
Window *childWindow = new Window(mainWindow);
|
||||
childWindow->setGeometry(margin, topVerticalMargin,
|
||||
width - 2 * margin, height - margin - topVerticalMargin);
|
||||
childWindow->show();
|
||||
@ -276,6 +276,7 @@ void tst_NoQtEventLoop::consumeMouseEvents()
|
||||
if (g_exit)
|
||||
break;
|
||||
}
|
||||
delete mainWindow;
|
||||
|
||||
QCOMPARE(testThread->passed(), true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user