assertion weakened to a warning

This commit is contained in:
Uwe Rathmann 2020-03-10 10:28:39 +01:00
parent 3fd4714bd9
commit 4dad15f591
1 changed files with 7 additions and 2 deletions

View File

@ -45,8 +45,12 @@ QskControl::~QskControl()
#if defined( QT_DEBUG )
if ( auto w = window() )
{
// to catch suicide situations as a result of mouse clicks
Q_ASSERT( this != w->mouseGrabberItem() );
if( this == w->mouseGrabberItem() )
{
// to catch suicide situations as a result of mouse clicks
qWarning() << "QskControl::~QskControl: probably suicide situation detected, control is the mouse grabber item" << this;
}
}
#endif
}
@ -901,6 +905,7 @@ void QskControl::updateItemPolish()
We don't want to resize invisible children, but then
we would need to set up connections to know when a child
becomes visible. So we don't use qskIsVisibleToLayout here.
And what about using QskControl::LayoutOutWhenHidden ?
*/
if ( !qskIsTransparentForPositioner( child ) )
{