1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-08 07:07:05 +02: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: // in case of unclean shutdown last time:
query.exec( "UPDATE source SET isonline = 'false'" ); query.exec( "UPDATE source SET isonline = 'false'" );
m_fuzzyIndex = new FuzzyIndex( *this, schemaUpdated ); m_fuzzyIndex = new FuzzyIndex( schemaUpdated );
if ( schemaUpdated ) if ( schemaUpdated )
QTimer::singleShot( 0, this, SLOT( updateIndex() ) ); QTimer::singleShot( 0, this, SLOT( updateIndex() ) );

View File

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

View File

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