Hello community, here is the log from the commit of package amarok for openSUSE:Factory checked in at 2012-05-09 07:24:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/amarok (Old) and /work/SRC/openSUSE:Factory/.amarok.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "amarok", Maintainer is "kde-maintainers@suse.de" Changes: -------- --- /work/SRC/openSUSE:Factory/amarok/amarok.changes 2012-02-08 15:36:48.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.amarok.new/amarok.changes 2012-05-09 07:24:44.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Mar 6 04:24:27 UTC 2012 - stefan.bruens@rwth-aachen.de + +- Revert: Fix detection of mounts of NFS & SMB Shares + depends on fix in solids mtab handling, available with SC 4.8.2 + +------------------------------------------------------------------- New: ---- revert_solid_workaround.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ amarok.spec ++++++ --- /var/tmp/diff_new_pack.n5xJTf/_old 2012-05-09 07:24:46.000000000 +0200 +++ /var/tmp/diff_new_pack.n5xJTf/_new 2012-05-09 07:24:46.000000000 +0200 @@ -37,6 +37,7 @@ Patch3: flac_mimetype_bnc671581.diff # PATCH-FIX-UPSTREAM kde#290123 idoenmez@suse.de -- Fix for kde bug 290123 Patch4: kde-290123.patch +Patch5: revert_solid_workaround.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # Required for the fdupes macro @@ -66,10 +67,10 @@ BuildRequires: libqjson-devel BuildRequires: loudmouth-devel BuildRequires: mysql-community-server +BuildRequires: qt4-qtscript BuildRequires: taglib-devel BuildRequires: taglib-extras-devel BuildRequires: tcpd-devel -BuildRequires: qt4-qtscript %if 0%{?suse_version} BuildRequires: update-desktop-files %endif @@ -99,6 +100,7 @@ %patch3 %endif %patch4 -p1 +%patch5 -p1 # Remove build time references so build-compare can do its work FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y') ++++++ revert_solid_workaround.diff ++++++ 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 */ -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org