Move to kdereview: solid-actions-kcm

Ben Cooksley sourtooth at gmail.com
Thu Feb 26 03:28:52 GMT 2009


On Wed, Feb 25, 2009 at 9:28 PM, Kevin Ottens <ervin at kde.org> wrote:
> 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.
I didn't know about this. Thanks for the pointer.

>
> 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.
Done, this has now been implemented. I am currently implementing a
system to add spacing / correct capitalisation so that it can generate
Desktop files with sane Names

>
> 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."
>

Regards,
Ben Cooksley




More information about the kde-core-devel mailing list