1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-21 00:09:47 +01:00

* No need to pass DatabaseImpl into FuzzyIndex.

This commit is contained in:
Christian Muehlhaeuser 2012-05-30 21:58:16 +02:00
parent 62f041cc2a
commit 2820774220
3 changed files with 3 additions and 5 deletions

View File

@ -79,7 +79,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( *this, schemaUpdated );
m_fuzzyIndex = new FuzzyIndex( schemaUpdated );
if ( schemaUpdated )
QTimer::singleShot( 0, this, SLOT( updateIndex() ) );

View File

@ -38,9 +38,8 @@ using namespace lucene::queryParser;
using namespace lucene::search;
FuzzyIndex::FuzzyIndex( DatabaseImpl& db, bool wipeIndex )
FuzzyIndex::FuzzyIndex( bool wipeIndex )
: QObject()
, m_db( db )
, m_luceneReader( 0 )
, m_luceneSearcher( 0 )
{

View File

@ -55,7 +55,7 @@ class FuzzyIndex : public QObject
Q_OBJECT
public:
explicit FuzzyIndex( DatabaseImpl& db, bool wipeIndex = false );
explicit FuzzyIndex( bool wipeIndex = false );
~FuzzyIndex();
void beginIndexing();
@ -72,7 +72,6 @@ public slots:
QMap< int, float > searchAlbum( const Tomahawk::query_ptr& query );
private:
DatabaseImpl& m_db;
QMutex m_mutex;
QString m_lucenePath;