Solid API change request (with patch)

Jeff Mitchell kde-dev at emailgoeshere.com
Fri Nov 2 11:29:17 GMT 2007


On Friday 02 November 2007, Kevin Ottens wrote:
> A couple of things regarding your patch:
>
> * line 10:
> +        connect(dev.as<Solid::StorageAccess>(),
> SIGNAL(accessibilityChanged(bool, const QString &udi)),
> should probably be:
> +        connect(dev.as<Solid::StorageAccess>(),
> SIGNAL(accessibilityChanged(bool, const QString &)),

Yes, that's a typo, I'll fix it.

> * The changes in solid/ifaces and solid/backends are probably unnecessary.
> The fact that we add the UDI should probably be a frontend only feature. At
> that point we could have enough information to provide this information...
> Granted the current organization would have to be slightly adapted in the
> frontend code. Maybe a cleanup for post-4.0...

The signal is actually being emitted by the backend, not the frontend.  The 
frontend simply re-emits the signal (signal connected to signal).  So I don't 
quite follow.

If I remove the backend/ifaces part of it, then in the frontend you have to 
connect the signal from the backend to a slot, determine which object in the 
backend sent the signal (which is the exact issue I'm trying to fix), and 
then re-emit the signal with the proper udi.

Or am I missing something...?

Another thing: This issue (having to monkey around with pointers and have 
messy code to figure out what's sending a signal since the udi isn't being 
passed) is not actually localized to StorageAccess, it's in many of the Solid 
modules.  See, for instance, Solid::AcAdapter and Solid::Battery.  I'm 
wondering if perhaps a comprehensive update across the board should be done.

--Jeff




More information about the kde-core-devel mailing list