Olivier Goffart ogoffart at kde.org
Thu Mar 2 21:50:33 GMT 2006

Le Jeudi 2 Mars 2006 21:02, Aaron J. Seigo a écrit :
> hi all...
> to ensure that the latter happens i suggested we provide a utility class
> that app developers can use easily to set autostart on/off. this has the
> happy side effect of future proofing how this is handled by apps in case
> the methods used to accomplish this change, such as the addition of a
> command line tool to add/remove autostart .desktop files for security
> reasons or if we move away from .desktop files for this (though that's
> unlikely?)

Great idea.

> attached is an API for such a class for review. if it is accepted i'd like
> to add this for KDE4 as one of the "KDE component" classes rather than add
> it to kdecore and then later move it.

I don't understand the example in the apidoc correctly. 
Isn't setAutoStart supposed to write the config in the desktop file (where the 
autostart flag is actually stored) ?   Why are we reading this flag from 
another config file ?

Just a small comment on the API:

        bool autoStarts(const QString& environment = QString(),
                        bool checkStartCondition = false,
                        bool checkTryExec = false);

I think that you should use QFlags instead of bool.

Related note:  shouldn't we decide about a convention for name of enums and 
QFlags typedef for options that are used just for one function.
enum functionnameOption {...};
Q_DECLAREFLAGS ( functionnameOption , functionnameOptions )  
and put that somewhere in a kde developper guidelines ?
(with all other still not wrote convention, like Private* const d)
I may start write a draft. Is there others things you think about ?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060302/7ea29a7c/attachment.sig>

More information about the kde-core-devel mailing list