blockin update calss, when not having any content ( avoids warnings from

Qt, when being built in debug mode )
This commit is contained in:
Uwe Rathmann 2018-07-13 08:37:44 +02:00
parent 3f28bd463f
commit 609ab2d54b

View File

@ -731,7 +731,8 @@ void QskControl::updateControlFlag( uint flag, bool on )
case QskControl::DebugForceBackground: case QskControl::DebugForceBackground:
{ {
// no need to mark it dirty // no need to mark it dirty
update(); if ( flags() & QQuickItem::ItemHasContents )
update();
break; break;
} }
default: default:
@ -1353,7 +1354,9 @@ bool QskControl::event( QEvent* event )
resetImplicitSize(); resetImplicitSize();
polish(); polish();
update();
if ( flags() & QQuickItem::ItemHasContents )
update();
changeEvent( event ); changeEvent( event );
return true; return true;
@ -1441,7 +1444,9 @@ void QskControl::changeEvent( QEvent* event )
resetImplicitSize(); resetImplicitSize();
polish(); polish();
update();
if ( flags() & QQuickItem::ItemHasContents )
update();
} }
} }
@ -1639,7 +1644,14 @@ void QskControl::updatePolish()
} }
if ( !d->isInitiallyPainted ) if ( !d->isInitiallyPainted )
{
/*
We should find a better way for identifying, when
an item is about to be shown, than making it dependend
from polishing and the existence of scene graph nodes. TODO ...
*/
aboutToShow(); aboutToShow();
}
updateLayout(); updateLayout();
} }