mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 17:14:00 +02:00
* Delay updateIndex until database is ready.
This commit is contained in:
@@ -1524,6 +1524,12 @@ TomahawkSettings::setPrivateListeningMode( TomahawkSettings::PrivateListeningMod
|
|||||||
void
|
void
|
||||||
TomahawkSettings::updateIndex()
|
TomahawkSettings::updateIndex()
|
||||||
{
|
{
|
||||||
|
if ( !Database::instance() || !Database::instance()->isReady() )
|
||||||
|
{
|
||||||
|
QTimer::singleShot( 0, this, SLOT( updateIndex() ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Tomahawk::DatabaseCommand* cmd = new Tomahawk::DatabaseCommand_UpdateSearchIndex();
|
Tomahawk::DatabaseCommand* cmd = new Tomahawk::DatabaseCommand_UpdateSearchIndex();
|
||||||
Database::instance()->enqueue( QSharedPointer<Tomahawk::DatabaseCommand>( cmd ) );
|
Database::instance()->enqueue( QSharedPointer<Tomahawk::DatabaseCommand>( cmd ) );
|
||||||
}
|
}
|
||||||
|
@@ -79,7 +79,6 @@
|
|||||||
#include "dialogs/SettingsDialog.h"
|
#include "dialogs/SettingsDialog.h"
|
||||||
#include "ActionCollection.h"
|
#include "ActionCollection.h"
|
||||||
#include "widgets/HeaderLabel.h"
|
#include "widgets/HeaderLabel.h"
|
||||||
#include "TomahawkSettings.h"
|
|
||||||
#include "utils/TomahawkStyle.h"
|
#include "utils/TomahawkStyle.h"
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
Reference in New Issue
Block a user