mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-14 01:54:07 +02:00
* Make sure our private markAsReady method is connected (and hence called) first. Log a message when db is ready.
This commit is contained in:
@@ -55,9 +55,9 @@ Database::Database( const QString& dbname, QObject* parent )
|
||||
|
||||
tDebug() << Q_FUNC_INFO << "Using" << m_maxConcurrentThreads << "database worker threads";
|
||||
|
||||
connect( m_impl, SIGNAL( indexReady() ), SLOT( markAsReady() ) );
|
||||
connect( m_impl, SIGNAL( indexReady() ), SIGNAL( indexReady() ) );
|
||||
connect( m_impl, SIGNAL( indexReady() ), SIGNAL( ready() ) );
|
||||
connect( m_impl, SIGNAL( indexReady() ), SLOT( setIsReadyTrue() ) );
|
||||
|
||||
Q_ASSERT( m_workerRW );
|
||||
m_workerRW.data()->start();
|
||||
@@ -192,3 +192,11 @@ Database::impl()
|
||||
|
||||
return m_implHash.value( thread );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Database::markAsReady()
|
||||
{
|
||||
tLog() << Q_FUNC_INFO << "Database is ready now!";
|
||||
m_ready = true;
|
||||
}
|
||||
|
@@ -71,7 +71,7 @@ public slots:
|
||||
void enqueue( const QList< QSharedPointer<DatabaseCommand> >& lc );
|
||||
|
||||
private slots:
|
||||
void setIsReadyTrue() { m_ready = true; }
|
||||
void markAsReady();
|
||||
|
||||
private:
|
||||
bool m_ready;
|
||||
|
Reference in New Issue
Block a user