code cleanup

This commit is contained in:
Uwe Rathmann 2025-01-09 11:35:41 +01:00
parent 7667ed3948
commit a1d56c2c7e
2 changed files with 4 additions and 13 deletions

View File

@ -890,7 +890,6 @@ void QskItem::itemChange( QQuickItem::ItemChange change,
qskFilterWindow( changeData.window ); qskFilterWindow( changeData.window );
} }
#if 1
auto oldWindow = qskReleasedWindowCounter->window(); auto oldWindow = qskReleasedWindowCounter->window();
if ( oldWindow && oldWindow->contentItem() if ( oldWindow && oldWindow->contentItem()
@ -921,9 +920,6 @@ void QskItem::itemChange( QQuickItem::ItemChange change,
wd->activeFocusItem = nullptr; wd->activeFocusItem = nullptr;
} }
} }
#endif
#if 1
if ( changeData.window == nullptr ) if ( changeData.window == nullptr )
{ {
Q_D( QskItem ); Q_D( QskItem );
@ -942,7 +938,6 @@ void QskItem::itemChange( QQuickItem::ItemChange change,
d->focus = false; d->focus = false;
} }
} }
#endif
QskWindowChangeEvent event( oldWindow, changeData.window ); QskWindowChangeEvent event( oldWindow, changeData.window );
QCoreApplication::sendEvent( this, &event ); QCoreApplication::sendEvent( this, &event );
@ -957,14 +952,7 @@ void QskItem::itemChange( QQuickItem::ItemChange change,
case QQuickItem::ItemVisibleHasChanged: case QQuickItem::ItemVisibleHasChanged:
{ {
Q_D( QskItem ); Q_D( QskItem );
#if 1
/*
~QQuickItem sends QQuickItem::ItemVisibleHasChanged recursively
to all childItems. When being a child ( not only a childItem() )
we are short before being destructed too and any updates
done here are totally pointless. TODO ...
*/
#endif
if ( changeData.boolValue ) if ( changeData.boolValue )
{ {
if ( d->blockedPolish ) if ( d->blockedPolish )

View File

@ -61,6 +61,9 @@ bool qskIsItemComplete( const QQuickItem* item )
bool qskIsItemInDestructor( const QQuickItem* item ) bool qskIsItemInDestructor( const QQuickItem* item )
{ {
if ( item == nullptr )
return false;
auto d = QQuickItemPrivate::get( item ); auto d = QQuickItemPrivate::get( item );
#if QT_VERSION >= QT_VERSION_CHECK( 6, 5, 0 ) #if QT_VERSION >= QT_VERSION_CHECK( 6, 5, 0 )