Skip to content

Commit

Permalink
Revert "Remove unused mutates parameters, since we base our work on w…
Browse files Browse the repository at this point in the history
…hat the command claims"

This reverts commit 6b6ccee.
  • Loading branch information
jefferai committed Jun 21, 2012
1 parent 6b6ccee commit 408bc71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/libtomahawk/database/Database.cpp
Expand Up @@ -42,7 +42,7 @@ Database::Database( const QString& dbname, QObject* parent )
: QObject( parent )
, m_ready( false )
, m_impl( new DatabaseImpl( dbname ) )
, m_workerRW( new DatabaseWorker( this ) )
, m_workerRW( new DatabaseWorker( this, true ) )
{
s_instance = this;

Expand Down Expand Up @@ -100,7 +100,7 @@ Database::enqueue( const QSharedPointer<DatabaseCommand>& lc )
// create new thread if < WORKER_THREADS
if ( m_workers.count() < m_maxConcurrentThreads )
{
DatabaseWorker* worker = new DatabaseWorker( this );
DatabaseWorker* worker = new DatabaseWorker( this, false );
worker->start();

m_workers << worker;
Expand Down
5 changes: 4 additions & 1 deletion src/libtomahawk/database/DatabaseWorker.cpp
Expand Up @@ -34,11 +34,14 @@
//#define DEBUG_TIMING TRUE
#endif

DatabaseWorker::DatabaseWorker( Database* db )
DatabaseWorker::DatabaseWorker( Database* db, bool mutates )
: QThread()
, m_db( db )
, m_outstanding( 0 )
{
Q_UNUSED( db );
Q_UNUSED( mutates );

moveToThread( this );

qDebug() << "CTOR DatabaseWorker" << this->thread();
Expand Down
2 changes: 1 addition & 1 deletion src/libtomahawk/database/DatabaseWorker.h
Expand Up @@ -39,7 +39,7 @@ class DatabaseWorker : public QThread
Q_OBJECT

public:
DatabaseWorker( Database* );
DatabaseWorker( Database*, bool mutates );
~DatabaseWorker();

bool busy() const { return m_outstanding > 0; }
Expand Down

0 comments on commit 408bc71

Please sign in to comment.