From 4c5cc91f8878983779e1f3d179920c8755d5aa6b Mon Sep 17 00:00:00 2001 From: mitchell Date: Fri, 26 Oct 2007 22:25:15 +0000 Subject: [PATCH] Make PMP detection work, who knows why it didn't the other way, leave for debugging git-svn-id: svn+ssh://svn.kde.org/home/kde/trunk/extragear/multimedia/amarok@729774 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/MediaDeviceCache.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/MediaDeviceCache.cpp b/src/MediaDeviceCache.cpp index 5dd154c33..cd99b79a5 100644 --- a/src/MediaDeviceCache.cpp +++ b/src/MediaDeviceCache.cpp @@ -83,14 +83,16 @@ MediaDeviceCache::addSolidDevice( const QString &udi ) { DEBUG_BLOCK Solid::Device device( udi ); - debug() << "Found Solid::DeviceInterface::PortableMediaPlayer with udi = " << device.udi(); + debug() << "Found new Solid device with udi = " << device.udi(); debug() << "Device name is = " << device.product() << " and was made by " << device.vendor(); + Solid::PortableMediaPlayer* pmp = dynamic_cast( device.asDeviceInterface( Solid::DeviceInterface::PortableMediaPlayer ) ); if( m_type.contains( udi ) ) { debug() << "Duplicate UDI trying to be added: " << udi; return; } - if( !device.isDeviceInterface( Solid::DeviceInterface::PortableMediaPlayer ) ); +// if( !device.isDeviceInterface( Solid::DeviceInterface::PortableMediaPlayer ) ); + if( !pmp ) { debug() << "udi " << udi << " does not describe a portable media player"; return; -- 2.11.4.GIT