diff --git a/src/libtomahawk/database/Database.cpp b/src/libtomahawk/database/Database.cpp index 70deab543..5d6ce5a21 100644 --- a/src/libtomahawk/database/Database.cpp +++ b/src/libtomahawk/database/Database.cpp @@ -79,7 +79,7 @@ Database::~Database() m_idWorker->stop(); delete m_idWorker; - + if ( m_workerRW ) m_workerRW.data()->quit(); foreach ( QWeakPointer< DatabaseWorkerThread > workerThread, m_workerThreads ) @@ -102,10 +102,10 @@ Database::~Database() } } m_workerThreads.clear(); - + qDeleteAll( m_implHash.values() ); delete m_impl; - + } @@ -145,7 +145,7 @@ Database::enqueue( const QSharedPointer& lc ) for ( int i = 0; i < m_workerThreads.count(); i++ ) { workerThread = m_workerThreads.at( i ); - + if ( workerThread && workerThread.data()->worker() && !workerThread.data()->worker().data()->busy() ) { happyWorker = workerThread.data()->worker(); diff --git a/src/libtomahawk/database/DatabaseImpl.cpp b/src/libtomahawk/database/DatabaseImpl.cpp index c0825a974..ed9dc8a6e 100644 --- a/src/libtomahawk/database/DatabaseImpl.cpp +++ b/src/libtomahawk/database/DatabaseImpl.cpp @@ -71,6 +71,7 @@ DatabaseImpl::DatabaseImpl( const QString& dbname ) // in case of unclean shutdown last time: query.exec( "UPDATE source SET isonline = 'false'" ); + query.exec( "DELETE FROM oplog WHERE source IS NULL AND singleton = 'true'" ); m_fuzzyIndex = new FuzzyIndex( this, schemaUpdated );