Reduce Applet::containment calls
It's not a cheap call, and there's no need to re-calculate it every time.
This commit is contained in:
parent
e1051994ad
commit
97cf403288
@ -453,8 +453,8 @@ Plasma::Types::ItemStatus AppletInterface::status() const
|
||||
|
||||
int AppletInterface::screen() const
|
||||
{
|
||||
if (applet()->containment()) {
|
||||
return applet()->containment()->screen();
|
||||
if (Plasma::Containment* c = applet()->containment()) {
|
||||
return c->screen();
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user