Blame SOURCES/kde-runtime-solid-device-automounter.patch

11172e
diff --git a/solid-device-automounter/kcm/DeviceAutomounterKCM.cpp b/solid-device-automounter/kcm/DeviceAutomounterKCM.cpp
11172e
index 42fbfae..80f6d28 100644
11172e
--- a/solid-device-automounter/kcm/DeviceAutomounterKCM.cpp
11172e
+++ b/solid-device-automounter/kcm/DeviceAutomounterKCM.cpp
11172e
@@ -57,6 +57,7 @@ DeviceAutomounterKCM::DeviceAutomounterKCM(QWidget *parent, const QVariantList &
11172e
 
11172e
     m_devices = new DeviceModel(this);
11172e
     deviceView->setModel(m_devices);
11172e
+    deviceView->setEnabled(true);
11172e
 
11172e
     connect(automountOnLogin, SIGNAL(stateChanged(int)), this, SLOT(emitChanged()));
11172e
     connect(automountOnPlugin, SIGNAL(stateChanged(int)), this, SLOT(emitChanged()));
11172e
@@ -112,12 +113,10 @@ DeviceAutomounterKCM::enabledChanged()
11172e
         automountOnLogin->setEnabled(false);
11172e
         automountOnPlugin->setEnabled(false);
11172e
         automountUnknownDevices->setEnabled(false);
11172e
-        deviceView->setEnabled(false);
11172e
     } else {
11172e
         automountOnLogin->setEnabled(true);
11172e
         automountOnPlugin->setEnabled(true);
11172e
         automountUnknownDevices->setEnabled(true);
11172e
-        deviceView->setEnabled(true);
11172e
     }
11172e
 }
11172e
 
11172e
diff --git a/solid-device-automounter/kcm/DeviceModel.cpp b/solid-device-automounter/kcm/DeviceModel.cpp
11172e
index 9469cb6..7ab6eb4 100644
11172e
--- a/solid-device-automounter/kcm/DeviceModel.cpp
11172e
+++ b/solid-device-automounter/kcm/DeviceModel.cpp
11172e
@@ -60,7 +60,8 @@ void
11172e
 DeviceModel::deviceAttached(const QString &udi)
11172e
 {
11172e
     Solid::Device dev(udi);
11172e
-    if (dev.is<Solid::StorageVolume>()) {
11172e
+    Solid::StorageVolume *volume = dev.as<Solid::StorageVolume>();
11172e
+    if (volume && !volume->isIgnored()) {
11172e
         if (m_disconnected.contains(udi)) {
11172e
             emit layoutAboutToBeChanged();
11172e
             beginRemoveRows(index(1, 0), m_disconnected.indexOf(udi), m_disconnected.indexOf(udi));
11172e
@@ -81,7 +82,6 @@ DeviceModel::deviceRemoved(const QString &udi)
11172e
         m_attached.removeOne(udi);
11172e
         endRemoveRows();
11172e
         emit layoutChanged();
11172e
-        addNewDevice(udi);
11172e
     }
11172e
 }
11172e