Kaydet (Commit) bf428ae4 authored tarafından Michael Meeks's avatar Michael Meeks

vcl: add assert and improve lifecycle test.

Change-Id: Ic70a890dae41b04d6dd1f19cbea419fe5a794af3
üst ef5ee324
......@@ -90,6 +90,7 @@ void LifecycleTest::testParentedWidgets()
VclPtr<WorkWindow> xWin(new WorkWindow((vcl::Window *)NULL,
WB_APP|WB_STDWORK));
CPPUNIT_ASSERT(xWin.get() != NULL);
xWin->Show();
testWidgets(xWin);
}
......
......@@ -144,6 +144,10 @@ void Window::dispose()
assert( !mpWindowImpl->mbInDispose && "vcl::Window - already in dispose()" );
mpWindowImpl->mbInDispose = true;
assert( !mpWindowImpl->mpParent ||
!mpWindowImpl->mpParent->IsDisposed() ||
"vcl::Window child should have its parent disposed first" );
// remove Key and Mouse events issued by Application::PostKey/MouseEvent
Application::RemoveMouseAndKeyEvents( this );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment