mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 16:44:05 +02:00
* Print out a warning and abort when trying to enqueue a DatabaseCommand before Database is ready.
This commit is contained in:
@@ -120,6 +120,12 @@ void
|
||||
Database::enqueue( const QList< QSharedPointer<DatabaseCommand> >& lc )
|
||||
{
|
||||
Q_ASSERT( m_ready );
|
||||
if ( !m_ready )
|
||||
{
|
||||
tDebug() << "Can't enqueue DatabaseCommand, Database is not ready yet!";
|
||||
return;
|
||||
}
|
||||
|
||||
tDebug( LOGVERBOSE ) << "Enqueueing" << lc.count() << "commands to rw thread";
|
||||
if ( m_workerRW && m_workerRW.data()->worker() )
|
||||
m_workerRW.data()->worker().data()->enqueue( lc );
|
||||
@@ -130,6 +136,12 @@ void
|
||||
Database::enqueue( const QSharedPointer<DatabaseCommand>& lc )
|
||||
{
|
||||
Q_ASSERT( m_ready );
|
||||
if ( !m_ready )
|
||||
{
|
||||
tDebug() << "Can't enqueue DatabaseCommand, Database is not ready yet!";
|
||||
return;
|
||||
}
|
||||
|
||||
if ( lc->doesMutates() )
|
||||
{
|
||||
tDebug( LOGVERBOSE ) << "Enqueueing command to rw thread:" << lc->commandname();
|
||||
|
Reference in New Issue
Block a user