1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 00:54:20 +02:00

* Delay updateIndex until database is ready.

This commit is contained in:
Christian Muehlhaeuser
2014-09-20 21:24:27 +02:00
parent dfb9d89d23
commit e9d78d570b
2 changed files with 6 additions and 1 deletions

View File

@@ -1524,6 +1524,12 @@ TomahawkSettings::setPrivateListeningMode( TomahawkSettings::PrivateListeningMod
void
TomahawkSettings::updateIndex()
{
if ( !Database::instance() || !Database::instance()->isReady() )
{
QTimer::singleShot( 0, this, SLOT( updateIndex() ) );
return;
}
Tomahawk::DatabaseCommand* cmd = new Tomahawk::DatabaseCommand_UpdateSearchIndex();
Database::instance()->enqueue( QSharedPointer<Tomahawk::DatabaseCommand>( cmd ) );
}

View File

@@ -79,7 +79,6 @@
#include "dialogs/SettingsDialog.h"
#include "ActionCollection.h"
#include "widgets/HeaderLabel.h"
#include "TomahawkSettings.h"
#include "utils/TomahawkStyle.h"
#include "config.h"