LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File revert_solid_workaround.diff of Package amarok (Project openSUSE:Factory)

diff --git a/src/MediaDeviceCache.cpp b/src/MediaDeviceCache.cpp
index 15583b8..8682f4d 100644
--- a/src/MediaDeviceCache.cpp
+++ b/src/MediaDeviceCache.cpp
@@ -50,10 +50,10 @@
 {
     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( Solid::DeviceNotifier::instance(), SIGNAL( deviceAdded( QString & ) ),
+             this, SLOT( slotAddSolidDevice( QString & ) ) );
+    connect( Solid::DeviceNotifier::instance(), SIGNAL( deviceRemoved( QString & ) ),
+             this, SLOT( slotRemoveSolidDevice( QString & ) ) );
 }
 
 MediaDeviceCache::~MediaDeviceCache()
@@ -92,19 +92,17 @@
         {
             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.";
             }
         }
@@ -194,8 +192,8 @@
         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() )
@@ -267,8 +265,8 @@
     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 );
     }
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;
@@ -67,7 +66,6 @@
     private:
         QMap<QString, MediaDeviceCache::DeviceType> m_type;
         QMap<QString, QString> m_name;
-        QMap<QString, bool> m_accessibility;
         QStringList m_volumes;
         static MediaDeviceCache* s_instance;
 };