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:
@@ -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 ) );
|
||||
}
|
||||
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user