KDE/kdebase/workspace/plasma/containments/desktop

Jason Stubbs jasonbstubbs at gmail.com
Sun Jan 6 03:04:17 CET 2008


On Sunday 06 January 2008 05:03:44 JST, Aaron J. Seigo wrote:
> On Saturday 05 January 2008, Jason Stubbs wrote:
> > SVN commit 757612 by jstubbs:
> >
> > Add icons after the event loop is returned to rather than assuming that
> > all saved applets have been restored at the time that
> > constraintsUpdated() is called.
> >
> >  {
> > +    QTimer::singleShot(0, this, SLOT(init()));
>
> of course, this is just another kind of assumption: that applet loading is
> doing without entering the event loop again.
>
> if it is really important to know when applet loading is done, something
> that really only Corona can know, then we can easily add a constraint that
> notes this and then be 100% sure this will be the case.

This is probably necessary as long as ~/Desktop is handled as icon applets 
within a containment.

> > -void IconLoader::init(DefaultDesktop *desktop)
> > +void IconLoader::init()
> >  {
> > -    if (!desktop) {
> > -        return;
> > -    }
> > -    //multiple initiation guard
> > -    if (desktop == m_desktop) {
> > -        return;
> > -    }
>
> removing the guard completely is probably ok with how it is done in this
> rev, but private slots aren't so private. =/

Really? Does connect() and friends work on other classes protected and private 
slots too?

> personally, i'd be more comfortable with corona telling containments when
> their startup loading is complete so that there are no assumptions and have
> IconLoader::init() called from there; this would mean putting a guard back
> of course.
>
> again, peer reviewing this patch prior to commit woul have been a good
> idea.

Itchy fingers... a metric of "changes code paths" works here, too. Now just to 
stick to it...

-- 
Jason Stubbs


More information about the Panel-devel mailing list