mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
* Don't manually delete the fuzzy index, instead rely on QObject parenting.
This commit is contained in:
parent
2b3f850259
commit
fc5fa6d4ea
@ -74,7 +74,7 @@ DatabaseImpl::DatabaseImpl( const QString& dbname, Database* parent )
|
||||
// in case of unclean shutdown last time:
|
||||
query.exec( "UPDATE source SET isonline = 'false'" );
|
||||
|
||||
m_fuzzyIndex = new FuzzyIndex( schemaUpdated );
|
||||
m_fuzzyIndex = new FuzzyIndex( this, schemaUpdated );
|
||||
if ( schemaUpdated )
|
||||
QTimer::singleShot( 0, this, SLOT( updateIndex() ) );
|
||||
|
||||
@ -113,8 +113,6 @@ DatabaseImpl::init()
|
||||
|
||||
DatabaseImpl::~DatabaseImpl()
|
||||
{
|
||||
delete m_fuzzyIndex;
|
||||
|
||||
tDebug() << "Shutting down database.";
|
||||
|
||||
/*
|
||||
|
@ -38,8 +38,8 @@ using namespace lucene::queryParser;
|
||||
using namespace lucene::search;
|
||||
|
||||
|
||||
FuzzyIndex::FuzzyIndex( bool wipeIndex )
|
||||
: QObject()
|
||||
FuzzyIndex::FuzzyIndex( QObject* parent, bool wipeIndex )
|
||||
: QObject( parent )
|
||||
, m_luceneReader( 0 )
|
||||
, m_luceneSearcher( 0 )
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ class FuzzyIndex : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FuzzyIndex( bool wipeIndex = false );
|
||||
explicit FuzzyIndex( QObject* parent, bool wipeIndex = false );
|
||||
~FuzzyIndex();
|
||||
|
||||
void beginIndexing();
|
||||
|
Loading…
x
Reference in New Issue
Block a user