Commit a3c66110 authored by David Redondo's avatar David Redondo 🏎
Browse files

Include StorageVolumes by default

We are searching for a StorageDrive to see if it is on a HardDisk or or some
other type of device. However on some setups a Volume will not have StorageDrive
as an ancestor, this is for example the case when using lvm. So let's include
every volume by default and exclude only those for which we find a Drive that is
not a hard disk.

(cherry picked from commit 8747897a)
parent 77868f03
......@@ -192,18 +192,19 @@ void DisksPlugin::addDevice(const Solid::Device& device)
if (!access || !volume || volume->isIgnored()) {
Solid::Device drive = device;
while (drive.isValid() && !<Solid::StorageDrive>()) {
// Only exlude volumes if we know that they are for sure not on a hard disk
while (drive.isValid()) {
if (<Solid::StorageDrive>()) {
auto type =<Solid::StorageDrive>()->driveType();
if (type == Solid::StorageDrive::HardDisk) {
} else {
drive = drive.parent();
if (!drive.isValid()) {
if (<Solid::StorageDrive>()->driveType() != Solid::StorageDrive::HardDisk) {
if (access->filePath() != QString()) {
auto block =<Solid::Block>();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment