Move to kdereview: solid-actions-kcm

Kevin Ottens ervin at kde.org
Wed Feb 25 08:28:34 GMT 2009


On Wednesday 25 February 2009 06:21:44 Ben Cooksley wrote:
> I am trying to get objects for all the various types of
> Solid::DeviceInterface ( AcAdapter, OpticalDisc, etc ) in order to
> access their Meta objects to get the needed information to list values
> / classes not in the desktop files.
> [...]

OK, I think I see.

> Is there any method in the Solid API I missed?

In the Solid API I'd say no, in Qt itself perhaps. ;-)

Why not using the staticMetaObject member on each of the relevant classes? You 
don't need an instance of Solid::StorageAccess to get its meta object, you can 
access directly Solid::StorageAccess:staticMetaObject.

That doesn't solve the issue of finding all the possible DeviceInterface 
subclasses automatically though, but IMHO that's fine. It means only adding a 
line from time to time to cover a new class, it'll already be simpler 
maintenance wise than chasing for changes and additions in all the properties 
of all the classes.

Regards.
-- 
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090225/21c4e24c/attachment.sig>


More information about the kde-core-devel mailing list