diff --git a/src/libtomahawk/Source.cpp b/src/libtomahawk/Source.cpp index 4dbc600da..833a82e11 100644 --- a/src/libtomahawk/Source.cpp +++ b/src/libtomahawk/Source.cpp @@ -292,10 +292,8 @@ Source::scanningProgress( unsigned int files ) void -Source::scanningFinished( unsigned int files ) +Source::scanningFinished() { - Q_UNUSED( files ); - m_textStatus = QString(); if ( m_updateIndexWhenSynced ) diff --git a/src/libtomahawk/Source.h b/src/libtomahawk/Source.h index 3f7547586..d4f583e4c 100644 --- a/src/libtomahawk/Source.h +++ b/src/libtomahawk/Source.h @@ -36,6 +36,7 @@ class DatabaseCommand_LogPlayback; class DatabaseCommand_SocialAction; class DatabaseCommand_UpdateSearchIndex; class DatabaseCommand_DeleteFiles; +class MusicScanner; namespace Tomahawk { @@ -50,6 +51,7 @@ friend class ::DatabaseCommand_LogPlayback; friend class ::DatabaseCommand_SocialAction; friend class ::DatabaseCommand_AddFiles; friend class ::DatabaseCommand_DeleteFiles; +friend class ::MusicScanner; public: enum AvatarStyle { Original, FancyStyle }; @@ -78,7 +80,7 @@ public: void setControlConnection( ControlConnection* cc ); void scanningProgress( unsigned int files ); - void scanningFinished( unsigned int files ); + void scanningFinished(); unsigned int trackCount() const; diff --git a/src/libtomahawk/filemetadata/ScanManager.cpp b/src/libtomahawk/filemetadata/ScanManager.cpp index 9b568440a..e2042c74b 100644 --- a/src/libtomahawk/filemetadata/ScanManager.cpp +++ b/src/libtomahawk/filemetadata/ScanManager.cpp @@ -147,7 +147,7 @@ ScanManager::runNormalScan( bool manualFull ) tLog() << Q_FUNC_INFO << "Error...Database is not ready, but should be"; return; } - + if ( QThread::currentThread() != ScanManager::instance()->thread() ) { QMetaObject::invokeMethod( this, "runNormalScan", Qt::QueuedConnection, Q_ARG( bool, manualFull ) ); @@ -155,7 +155,7 @@ ScanManager::runNormalScan( bool manualFull ) } tDebug( LOGVERBOSE ) << Q_FUNC_INFO; - + if ( m_musicScannerThreadController || !m_scanner.isNull() ) //still running if these are not zero { if ( m_queuedScanType != Full ) @@ -191,7 +191,7 @@ ScanManager::runFileScan( const QStringList &paths ) tLog() << Q_FUNC_INFO << "Error...Database is not ready, but should be"; return; } - + if ( QThread::currentThread() != ScanManager::instance()->thread() ) { QMetaObject::invokeMethod( this, "runFileScan", Qt::QueuedConnection, Q_ARG( QStringList, paths ) ); @@ -199,7 +199,7 @@ ScanManager::runFileScan( const QStringList &paths ) } tDebug( LOGVERBOSE ) << Q_FUNC_INFO; - + foreach( const QString& path, paths ) m_currScannerPaths.insert( path ); @@ -277,7 +277,7 @@ ScanManager::scannerFinished() m_musicScannerThreadController = 0; } - SourceList::instance()->getLocal()->scanningFinished( 0 ); + SourceList::instance()->getLocal()->scanningFinished(); emit finished(); if ( !m_queuedScanType == File )