Commit 5eb5c9ab authored by Méven Car's avatar Méven Car

Solid-device-automounter/kcm: Hide ignored Solid::StorageAccess

Summary:
BUG: 396537
FIXED-IN: 5.18

Reviewers: #plasma, broulik, ngraham, ervin

Reviewed By: ervin

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27019
parent acf38e4c
......@@ -26,6 +26,7 @@
#include <Solid/DeviceNotifier>
#include <Solid/Device>
#include <Solid/StorageVolume>
#include <Solid/StorageAccess>
#include "AutomounterSettings.h"
......@@ -114,14 +115,19 @@ void DeviceModel::addNewDevice(const QString &udi)
const Solid::Device dev(udi);
if (dev.isValid()) {
beginInsertRows(index(0, 0), m_attached.size(), m_attached.size());
m_attached << udi;
if (dev.is<Solid::StorageAccess>()) {
const Solid::StorageAccess *access = dev.as<Solid::StorageAccess>();
if (!access->isIgnored() || !access->isAccessible()) {
beginInsertRows(index(0, 0), m_attached.size(), m_attached.size());
m_attached << udi;
endInsertRows();
}
}
} else {
beginInsertRows(index(1, 0), m_disconnected.size(), m_disconnected.size());
m_disconnected << udi;
endInsertRows();
}
endInsertRows();
}
void DeviceModel::reload()
......
Markdown is supported
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