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

Make leaked child debugging more helpful wrt. the hierarchy.

Change-Id: Iadd2b5214661e00209f789c9ada83d5d9dce12b7
üst 0baadcea
...@@ -255,6 +255,22 @@ void Window::dispose() ...@@ -255,6 +255,22 @@ void Window::dispose()
OStringBuffer aErrorStr; OStringBuffer aErrorStr;
bool bError = false; bool bError = false;
vcl::Window* pTempWin; vcl::Window* pTempWin;
if ( mpWindowImpl->mpFirstChild )
{
OStringBuffer aTempStr("Window (");
aTempStr.append(lcl_createWindowInfo(*this));
aTempStr.append(") with live children destroyed: ");
pTempWin = mpWindowImpl->mpFirstChild;
while ( pTempWin )
{
aTempStr.append(lcl_createWindowInfo(*pTempWin));
pTempWin = pTempWin->mpWindowImpl->mpNext;
}
OSL_FAIL( aTempStr.getStr() );
Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed!
}
if (mpWindowImpl->mpFrameData != 0) if (mpWindowImpl->mpFrameData != 0)
{ {
pTempWin = mpWindowImpl->mpFrameData->mpFirstOverlap; pTempWin = mpWindowImpl->mpFrameData->mpFirstOverlap;
...@@ -302,21 +318,6 @@ void Window::dispose() ...@@ -302,21 +318,6 @@ void Window::dispose()
Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed! Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed!
} }
if ( mpWindowImpl->mpFirstChild )
{
OStringBuffer aTempStr("Window (");
aTempStr.append(lcl_createWindowInfo(*this));
aTempStr.append(") with live children destroyed: ");
pTempWin = mpWindowImpl->mpFirstChild;
while ( pTempWin )
{
aTempStr.append(lcl_createWindowInfo(*pTempWin));
pTempWin = pTempWin->mpWindowImpl->mpNext;
}
OSL_FAIL( aTempStr.getStr() );
Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed!
}
if ( mpWindowImpl->mpFirstOverlap ) if ( mpWindowImpl->mpFirstOverlap )
{ {
OStringBuffer aTempStr("Window ("); OStringBuffer aTempStr("Window (");
......
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