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:
parent
7b714bdecb
commit
d8e6992512
1 changed files with 1 additions and 1 deletions
|
@ -33,12 +33,12 @@ CustomTile::CustomTile(TileManager *tiling, CustomTile *parentItem)
|
||||||
{
|
{
|
||||||
setQuickTileMode(QuickTileFlag::Custom);
|
setQuickTileMode(QuickTileFlag::Custom);
|
||||||
m_geometryLock = true;
|
m_geometryLock = true;
|
||||||
connect(this, &CustomTile::layoutModified, parentItem, &CustomTile::layoutModified);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomTile *CustomTile::createChildAt(const QRectF &relativeGeometry, LayoutDirection layoutDirection, int position)
|
CustomTile *CustomTile::createChildAt(const QRectF &relativeGeometry, LayoutDirection layoutDirection, int position)
|
||||||
{
|
{
|
||||||
CustomTile *tile = new CustomTile(manager(), this);
|
CustomTile *tile = new CustomTile(manager(), this);
|
||||||
|
connect(tile, &CustomTile::layoutModified, this, &CustomTile::layoutModified);
|
||||||
tile->setRelativeGeometry(relativeGeometry);
|
tile->setRelativeGeometry(relativeGeometry);
|
||||||
tile->setLayoutDirection(layoutDirection);
|
tile->setLayoutDirection(layoutDirection);
|
||||||
manager()->model()->beginInsertTile(tile, position);
|
manager()->model()->beginInsertTile(tile, position);
|
||||||
|
|
Loading…
Reference in a new issue