Don't emit statusChanged if it hasn't changed

For some applets the status is bound to a complex expression that can be
re-evaluated a lot. This ends up causing a lot of unnecassary updates.

REVIEW: 126471
This commit is contained in:
David Edmundson 2015-12-22 14:03:03 +00:00
parent 344dbeb938
commit 01cd374c8e

View File

@ -453,6 +453,9 @@ Types::ItemStatus Applet::status() const
void Applet::setStatus(const Types::ItemStatus status)
{
if (status == d->itemStatus) {
return;
}
d->itemStatus = status;
emit statusChanged(status);
}