mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 09:34:53 +02:00
* Don't emit Database::ready() just because the FuzzyIndex became ready.
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
#include "DatabaseWorker.h"
|
#include "DatabaseWorker.h"
|
||||||
#include "IdThreadWorker.h"
|
#include "IdThreadWorker.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
#include <boost/concept_check.hpp>
|
||||||
|
|
||||||
#define DEFAULT_WORKER_THREADS 4
|
#define DEFAULT_WORKER_THREADS 4
|
||||||
#define MAX_WORKER_THREADS 16
|
#define MAX_WORKER_THREADS 16
|
||||||
@@ -56,7 +57,6 @@ Database::Database( const QString& dbname, QObject* parent )
|
|||||||
|
|
||||||
connect( m_impl, SIGNAL( indexReady() ), SLOT( markAsReady() ) );
|
connect( m_impl, SIGNAL( indexReady() ), SLOT( markAsReady() ) );
|
||||||
connect( m_impl, SIGNAL( indexReady() ), SIGNAL( indexReady() ) );
|
connect( m_impl, SIGNAL( indexReady() ), SIGNAL( indexReady() ) );
|
||||||
connect( m_impl, SIGNAL( indexReady() ), SIGNAL( ready() ) );
|
|
||||||
|
|
||||||
Q_ASSERT( m_workerRW );
|
Q_ASSERT( m_workerRW );
|
||||||
m_workerRW.data()->start();
|
m_workerRW.data()->start();
|
||||||
@@ -196,6 +196,10 @@ Database::impl()
|
|||||||
void
|
void
|
||||||
Database::markAsReady()
|
Database::markAsReady()
|
||||||
{
|
{
|
||||||
|
if ( m_ready )
|
||||||
|
return;
|
||||||
|
|
||||||
tLog() << Q_FUNC_INFO << "Database is ready now!";
|
tLog() << Q_FUNC_INFO << "Database is ready now!";
|
||||||
m_ready = true;
|
m_ready = true;
|
||||||
|
emit ready();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user