tiling: Fix invalid sender object in connect()

RootTile is a CustomTile and it has no parent because it's the root.
Therefore the sender object in connect() will be null and it's going to
produce a warning.
This commit is contained in:
Vlad Zahorodnii 2023-01-04 00:47:07 +02:00
parent 7b714bdecb
commit d8e6992512

View file

@ -33,12 +33,12 @@ CustomTile::CustomTile(TileManager *tiling, CustomTile *parentItem)
{
setQuickTileMode(QuickTileFlag::Custom);
m_geometryLock = true;
connect(this, &CustomTile::layoutModified, parentItem, &CustomTile::layoutModified);
}
CustomTile *CustomTile::createChildAt(const QRectF &relativeGeometry, LayoutDirection layoutDirection, int position)
{
CustomTile *tile = new CustomTile(manager(), this);
connect(tile, &CustomTile::layoutModified, this, &CustomTile::layoutModified);
tile->setRelativeGeometry(relativeGeometry);
tile->setLayoutDirection(layoutDirection);
manager()->model()->beginInsertTile(tile, position);