From d8e69925123b4c3335a89797774a5a1a0ed4223b Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 4 Jan 2023 00:47:07 +0200 Subject: [PATCH] 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. --- src/tiles/customtile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tiles/customtile.cpp b/src/tiles/customtile.cpp index 0d7d472587..9043ed328a 100644 --- a/src/tiles/customtile.cpp +++ b/src/tiles/customtile.cpp @@ -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);