----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/105432/#review15490 -----------------------------------------------------------
Just my 2 cents: This piece of API does not seem to belong to the dataengine. I would rather consider inclusion in the solid API; I vaguely recall having read (or written) some similar code somewhere else, so it would definitely make sense to put it in the libs. Best Regards - Jacopo De Simoi On July 5, 2012, 6:44 a.m., Andriy Gapon wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/105432/ > ----------------------------------------------------------- > > (Updated July 5, 2012, 6:44 a.m.) > > > Review request for Plasma and Solid. > > > Description > ------- > > Currently the code in SolidDeviceEngine::populateDeviceData sets volume's > Removable property in straightforward fashion: > - tries to cast volume's (immediate) parent device to Solid::StorageDrive > - if that succeeds, checks isHotpluggable() and isRemovable() properties of > the parent > The problem is that there could be intermediate devices in solid device > hierarchy between the volume and its Solid::StorageDrive ancestor, for > example partition-type devices. > > The proposed code walks up the hierarchy to try harder to find > Solid::StorageDrive ancestor of a given device. > > BTW, I think that getAncestorOfType() helper function introduced in the > proposed change can be useful for other code too, so it might make sense to > nominate it for inclusion into Solid API. > > > Diffs > ----- > > plasma/generic/dataengines/soliddevice/soliddeviceengine.cpp 608da25 > > Diff: http://git.reviewboard.kde.org/r/105432/diff/ > > > Testing > ------- > > > Thanks, > > Andriy Gapon > >
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel