File revert_solid_workaround.diff of Package amarok

diff --git a/src/MediaDeviceCache.cpp b/src/MediaDeviceCache.cpp
index 15583b8..8682f4d 100644
--- a/src/MediaDeviceCache.cpp
+++ b/src/MediaDeviceCache.cpp
@@ -50,14 +50,10 @@ MediaDeviceCache::MediaDeviceCache() : QObject()
 {
     DEBUG_BLOCK
     s_instance = this;
-    connect( Solid::DeviceNotifier::instance(), SIGNAL( deviceAdded( const QString & ) ),
-             this, SLOT( slotAddSolidDevice( const QString & ) ) );
-    connect( Solid::DeviceNotifier::instance(), SIGNAL( deviceRemoved( const QString & ) ),
-             this, SLOT( slotRemoveSolidDevice( const QString & ) ) );
-    connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
-
-    m_timer.setSingleShot(true);
-    m_timer.start(1000);
+    connect( Solid::DeviceNotifier::instance(), SIGNAL( deviceAdded( QString) ),
+             this, SLOT( slotAddSolidDevice( QString) ) );
+    connect( Solid::DeviceNotifier::instance(), SIGNAL( deviceRemoved(QString) ),
+             this, SLOT( slotRemoveSolidDevice( QString) ) );
 }
 
 MediaDeviceCache::~MediaDeviceCache()
@@ -96,19 +92,17 @@ MediaDeviceCache::refreshCache()
         {
             if( !m_volumes.contains( device.udi() ) )
             {
-                connect( ssa, SIGNAL( accessibilityChanged(bool, const QString&) ),
-                    this, SLOT( slotAccessibilityChanged(bool, const QString&) ) );
+                connect( ssa, SIGNAL( accessibilityChanged(bool, QString) ),
+                    this, SLOT( slotAccessibilityChanged(bool, QString) ) );
                 m_volumes.append( device.udi() );
             }
             if( ssa->isAccessible() )
             {
                 m_type[device.udi()] = MediaDeviceCache::SolidVolumeType;
                 m_name[device.udi()] = ssa->filePath();
-                m_accessibility[ device.udi() ] = true;
             }
             else
             {
-                m_accessibility[ device.udi() ] = false;
                 debug() << "Solid device is not accessible, will wait until it is to consider it added.";
             }
         }
@@ -198,8 +192,8 @@ MediaDeviceCache::slotAddSolidDevice( const QString &udi )
         debug() << "volume is generic storage";
         if( !m_volumes.contains( device.udi() ) )
         {
-            connect( ssa, SIGNAL( accessibilityChanged(bool, const QString&) ),
-                this, SLOT( slotAccessibilityChanged(bool, const QString&) ) );
+            connect( ssa, SIGNAL( accessibilityChanged(bool, QString) ),
+                this, SLOT( slotAccessibilityChanged(bool, QString) ) );
             m_volumes.append( device.udi() );
         }
         if( ssa->isAccessible() )
@@ -271,8 +265,8 @@ MediaDeviceCache::slotRemoveSolidDevice( const QString &udi )
     Solid::Device device( udi );
     if( m_volumes.contains( udi ) )
     {
-        disconnect( device.as<Solid::StorageAccess>(), SIGNAL( accessibilityChanged(bool, const QString&) ),
-                    this, SLOT( slotAccessibilityChanged(bool, const QString&) ) );
+        disconnect( device.as<Solid::StorageAccess>(), SIGNAL( accessibilityChanged(bool, QString) ),
+                    this, SLOT( slotAccessibilityChanged(bool, QString) ) );
         m_volumes.removeAll( udi );
         emit deviceRemoved( udi );
     }
@@ -287,45 +281,6 @@ MediaDeviceCache::slotRemoveSolidDevice( const QString &udi )
     emit deviceRemoved( udi );
 }
 
-void MediaDeviceCache::slotTimeout()
-{
-    KMountPoint::List possibleMountList = KMountPoint::possibleMountPoints();
-    KMountPoint::List currentMountList = KMountPoint::currentMountPoints();
-    QList<Solid::Device> deviceList = Solid::Device::listFromType( Solid::DeviceInterface::StorageAccess );
-
-    for (KMountPoint::List::iterator it = possibleMountList.begin(); it != possibleMountList.end(); ++it) {
-        if ((*it)->mountType() == "nfs" || (*it)->mountType() == "nfs4" || 
-            (*it)->mountType() == "smb" || (*it)->mountType() == "cifs") {
-            QString path = (*it)->mountPoint();
-            bool mounted = false;
-            QString udi = QString();
-
-            foreach( const Solid::Device &device, deviceList )
-            {
-                const Solid::StorageAccess* ssa = device.as<Solid::StorageAccess>();
-                if( ssa && path == ssa->filePath())
-                    udi = device.udi();
-            }
-
-            for (KMountPoint::List::iterator it2 = currentMountList.begin(); it2 != currentMountList.end(); ++it2) {
-                if ( (*it)->mountType() == (*it2)->mountType() &&
-                     (*it)->mountPoint() == (*it2)->mountPoint() ) {
-                    mounted = true;
-                    break;
-                }
-            }
-
-            if ( m_accessibility[udi] != mounted ) {
-                m_accessibility[udi] = mounted;
-                slotAccessibilityChanged( mounted, udi);
-            }
-        }
-    }
-
-    m_timer.setSingleShot(true);
-    m_timer.start(1000);
-}
-
 void
 MediaDeviceCache::slotAccessibilityChanged( bool accessible, const QString &udi )
 {
diff --git a/src/MediaDeviceCache.h b/src/MediaDeviceCache.h
index a48d453..0e971cc 100644
--- a/src/MediaDeviceCache.h
+++ b/src/MediaDeviceCache.h
@@ -23,7 +23,6 @@
 #include <QMap>
 #include <QString>
 #include <QStringList>
-#include <QtCore/QTimer>
 
 namespace Solid {
     class Device;
@@ -62,15 +61,12 @@ class AMAROK_EXPORT MediaDeviceCache : public QObject
         void slotAddSolidDevice( const QString &udi );
         void slotRemoveSolidDevice( const QString &udi );
         void slotAccessibilityChanged( bool accessible, const QString &udi );
-        void slotTimeout();
 
     private:
         QMap<QString, MediaDeviceCache::DeviceType> m_type;
         QMap<QString, QString> m_name;
-        QMap<QString, bool> m_accessibility;
         QStringList m_volumes;
         static MediaDeviceCache* s_instance;
-        QTimer m_timer;
 };
 
 #endif /* AMAROK_MEDIADEVICECACHE_H */