Review Request: better handling of Removable property for volumes in soliddevice engine
Alberto Villa
avilla at freebsd.org
Sun Sep 9 09:20:29 UTC 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105432/#review18707
-----------------------------------------------------------
If adding that to the Solid API is a problem (because of the KDE-Libs freeze), please consider my solution: https://git.reviewboard.kde.org/r/106378
Anyway, I agree that having a method to retrieve the parent StorageDrive is the best solution. Still, please check my patch for differences.
- Alberto Villa
On Sept. 9, 2012, 7:28 a.m., Andriy Gapon wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105432/
> -----------------------------------------------------------
>
> (Updated Sept. 9, 2012, 7:28 a.m.)
>
>
> Review request for Plasma, Solid and Alberto Villa.
>
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120909/1f1650b5/attachment.html>
More information about the Plasma-devel
mailing list