1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-17 11:30:49 +02:00

Emit signal when indexing starts.

This commit is contained in:
Christian Muehlhaeuser
2014-10-19 10:18:49 +02:00
parent af0b14b728
commit f55ff6f13b
6 changed files with 8 additions and 1 deletions

View File

@@ -119,6 +119,7 @@ Database::Database( const QString& dbname, QObject* parent )
tDebug() << Q_FUNC_INFO << "Using" << m_maxConcurrentThreads << "database worker threads"; tDebug() << Q_FUNC_INFO << "Using" << m_maxConcurrentThreads << "database worker threads";
connect( m_impl, SIGNAL( indexReady() ), SLOT( markAsReady() ) ); connect( m_impl, SIGNAL( indexReady() ), SLOT( markAsReady() ) );
connect( m_impl, SIGNAL( indexStarted() ), SIGNAL( indexStarted() ) );
connect( m_impl, SIGNAL( indexReady() ), SIGNAL( indexReady() ) ); connect( m_impl, SIGNAL( indexReady() ), SIGNAL( indexReady() ) );
Q_ASSERT( m_workerRW ); Q_ASSERT( m_workerRW );

View File

@@ -101,7 +101,8 @@ public:
} }
signals: signals:
void indexReady(); // search index void indexStarted();
void indexReady();
void ready(); void ready();
void newJobRO( Tomahawk::dbcmd_ptr ); void newJobRO( Tomahawk::dbcmd_ptr );

View File

@@ -199,6 +199,7 @@ Tomahawk::DatabaseImpl::dumpDatabase()
void void
Tomahawk::DatabaseImpl::loadIndex() Tomahawk::DatabaseImpl::loadIndex()
{ {
connect( m_fuzzyIndex, SIGNAL( indexStarted() ), SIGNAL( indexStarted() ) );
connect( m_fuzzyIndex, SIGNAL( indexReady() ), SIGNAL( indexReady() ) ); connect( m_fuzzyIndex, SIGNAL( indexReady() ), SIGNAL( indexReady() ) );
m_fuzzyIndex->loadLuceneIndex(); m_fuzzyIndex->loadLuceneIndex();
} }

View File

@@ -86,7 +86,9 @@ public:
void loadIndex(); void loadIndex();
signals: signals:
void indexStarted();
void indexReady(); void indexReady();
void schemaUpdateStarted(); void schemaUpdateStarted();
void schemaUpdateStatus( const QString& message ); void schemaUpdateStatus( const QString& message );
void schemaUpdateDone(); void schemaUpdateDone();

View File

@@ -94,6 +94,7 @@ FuzzyIndex::updateIndexSlot()
void void
FuzzyIndex::beginIndexing() FuzzyIndex::beginIndexing()
{ {
emit indexStarted();
m_mutex.lock(); m_mutex.lock();
try try

View File

@@ -52,6 +52,7 @@ public:
virtual void updateIndex(); virtual void updateIndex();
signals: signals:
void indexStarted();
void indexReady(); void indexReady();
public slots: public slots: