[Icon Item] Explicitly emit overlaysChanged in the setter rather than connecting to it

There's literally just one place where this thing changes so just emit the signal
there and call it a day.

Differential Revision: https://phabricator.kde.org/D9112
This commit is contained in:
Kai Uwe Broulik 2017-12-02 18:11:24 +01:00
parent 1f9b5ed657
commit da2b6e270f

View File

@ -73,9 +73,6 @@ IconItem::IconItem(QQuickItem *parent)
connect(this, &QQuickItem::windowChanged,
this, &IconItem::schedulePixmapUpdate);
connect(this, &IconItem::overlaysChanged,
this, &IconItem::schedulePixmapUpdate);
connect(this, &IconItem::implicitWidthChanged, this, &IconItem::implicitWidthChanged2);
connect(this, &IconItem::implicitHeightChanged, this, &IconItem::implicitHeightChanged2);
@ -280,6 +277,7 @@ void IconItem::setOverlays(const QStringList &overlays)
return;
}
m_overlays = overlays;
schedulePixmapUpdate();
emit overlaysChanged();
}