mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
* Wipe index on upgrade to settings version 17.
This commit is contained in:
parent
1e8bab26b2
commit
7758cbb91f
@ -676,6 +676,10 @@ TomahawkSettings::doUpgrade( int oldVersion, int newVersion )
|
||||
else if ( oldVersion == 15 )
|
||||
{
|
||||
// 0.8.0 switches to Lucene++. Force a reindex.
|
||||
// updateIndex();
|
||||
}
|
||||
else if ( oldVersion == 16 )
|
||||
{
|
||||
updateIndex();
|
||||
}
|
||||
}
|
||||
@ -1524,12 +1528,15 @@ TomahawkSettings::setPrivateListeningMode( TomahawkSettings::PrivateListeningMod
|
||||
void
|
||||
TomahawkSettings::updateIndex()
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO;
|
||||
if ( !Database::instance() || !Database::instance()->isReady() )
|
||||
{
|
||||
QTimer::singleShot( 0, this, SLOT( updateIndex() ) );
|
||||
return;
|
||||
}
|
||||
|
||||
tDebug() << Q_FUNC_INFO << "Wiping index.";
|
||||
Database::instance()->wipeIndex();
|
||||
Tomahawk::DatabaseCommand* cmd = new Tomahawk::DatabaseCommand_UpdateSearchIndex();
|
||||
Database::instance()->enqueue( QSharedPointer<Tomahawk::DatabaseCommand>( cmd ) );
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <QNetworkProxy>
|
||||
#include <QStringList>
|
||||
|
||||
#define TOMAHAWK_SETTINGS_VERSION 16
|
||||
#define TOMAHAWK_SETTINGS_VERSION 17
|
||||
|
||||
/**
|
||||
* Convenience wrapper around QSettings for tomahawk-specific config
|
||||
|
Loading…
x
Reference in New Issue
Block a user