mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Revert "Remove unused mutates parameters, since we base our work on what the command claims"
This reverts commit 6b6ccee575
.
This commit is contained in:
@@ -42,7 +42,7 @@ Database::Database( const QString& dbname, QObject* parent )
|
|||||||
: QObject( parent )
|
: QObject( parent )
|
||||||
, m_ready( false )
|
, m_ready( false )
|
||||||
, m_impl( new DatabaseImpl( dbname ) )
|
, m_impl( new DatabaseImpl( dbname ) )
|
||||||
, m_workerRW( new DatabaseWorker( this ) )
|
, m_workerRW( new DatabaseWorker( this, true ) )
|
||||||
{
|
{
|
||||||
s_instance = this;
|
s_instance = this;
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ Database::enqueue( const QSharedPointer<DatabaseCommand>& lc )
|
|||||||
// create new thread if < WORKER_THREADS
|
// create new thread if < WORKER_THREADS
|
||||||
if ( m_workers.count() < m_maxConcurrentThreads )
|
if ( m_workers.count() < m_maxConcurrentThreads )
|
||||||
{
|
{
|
||||||
DatabaseWorker* worker = new DatabaseWorker( this );
|
DatabaseWorker* worker = new DatabaseWorker( this, false );
|
||||||
worker->start();
|
worker->start();
|
||||||
|
|
||||||
m_workers << worker;
|
m_workers << worker;
|
||||||
|
@@ -34,11 +34,14 @@
|
|||||||
//#define DEBUG_TIMING TRUE
|
//#define DEBUG_TIMING TRUE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DatabaseWorker::DatabaseWorker( Database* db )
|
DatabaseWorker::DatabaseWorker( Database* db, bool mutates )
|
||||||
: QThread()
|
: QThread()
|
||||||
, m_db( db )
|
, m_db( db )
|
||||||
, m_outstanding( 0 )
|
, m_outstanding( 0 )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( db );
|
||||||
|
Q_UNUSED( mutates );
|
||||||
|
|
||||||
moveToThread( this );
|
moveToThread( this );
|
||||||
|
|
||||||
qDebug() << "CTOR DatabaseWorker" << this->thread();
|
qDebug() << "CTOR DatabaseWorker" << this->thread();
|
||||||
|
@@ -39,7 +39,7 @@ class DatabaseWorker : public QThread
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DatabaseWorker( Database* );
|
DatabaseWorker( Database*, bool mutates );
|
||||||
~DatabaseWorker();
|
~DatabaseWorker();
|
||||||
|
|
||||||
bool busy() const { return m_outstanding > 0; }
|
bool busy() const { return m_outstanding > 0; }
|
||||||
|
Reference in New Issue
Block a user