KDE/kdebase/workspace/plasma/containments/desktop

Aaron J. Seigo aseigo at kde.org
Sat Jan 5 21:03:44 CET 2008


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.

> -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. =/

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.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080105/6781b768/attachment.pgp 


More information about the Panel-devel mailing list