1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-24 09:49:42 +01:00

* Delete obsolete singleton commands on startup.

This commit is contained in:
Christian Muehlhaeuser 2012-10-18 12:57:46 +02:00
parent 20802ae0c9
commit e439bd3b43
2 changed files with 5 additions and 4 deletions

View File

@ -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<DatabaseCommand>& 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();

View File

@ -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 );