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:
parent
344dbeb938
commit
01cd374c8e
@ -453,6 +453,9 @@ Types::ItemStatus Applet::status() const
|
|||||||
|
|
||||||
void Applet::setStatus(const Types::ItemStatus status)
|
void Applet::setStatus(const Types::ItemStatus status)
|
||||||
{
|
{
|
||||||
|
if (status == d->itemStatus) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
d->itemStatus = status;
|
d->itemStatus = status;
|
||||||
emit statusChanged(status);
|
emit statusChanged(status);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user