[Panel-devel] SolidDeviceEngine

Aaron J. Seigo aseigo at kde.org
Thu Nov 1 20:20:05 CET 2007


On Thursday 01 November 2007, Petri Damstén wrote:
> On Thursday 01 November 2007 14:40:26 Petri Damstén wrote:
> > I try to run two hard disk applets. First one runs query for Devices from
> > SolidDeviceEngine, which works fine. Devices seems to get deleted in
> > checkUsage since it's not used in connectSource(?). After that when other
> > Applet tries to query Devices it gets empty list since devicelist is not
> > empty (in SolidDeviceEngine::sourceRequested).
>
> ...and patch trying to solve this

this should not be necessary:

 if (!sources().contains(name)) {

because if it does exist, it just replaces the old data with the new. which is 
probably what you want: the latest information, right?

as a side note, i'd personally put the filling of devicelist into its own 
method ... huge, long methods that sprawl on forever are really nasty looking 
and produce the sorts of hard-to-read patches like yours (which is mostly 
just whitespace changes) ...

anyways, i suppose a bigger question is: why are you querying versus 
connecting? =)

-- 
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/20071101/ce1df841/attachment.pgp 


More information about the Panel-devel mailing list