From 28207742208454371bdbda620656b5094f5a4abc Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 30 May 2012 21:58:16 +0200 Subject: [PATCH] * No need to pass DatabaseImpl into FuzzyIndex. --- src/libtomahawk/database/DatabaseImpl.cpp | 2 +- src/libtomahawk/database/FuzzyIndex.cpp | 3 +-- src/libtomahawk/database/FuzzyIndex.h | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libtomahawk/database/DatabaseImpl.cpp b/src/libtomahawk/database/DatabaseImpl.cpp index f45f813af..3c13d975e 100644 --- a/src/libtomahawk/database/DatabaseImpl.cpp +++ b/src/libtomahawk/database/DatabaseImpl.cpp @@ -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() ) ); diff --git a/src/libtomahawk/database/FuzzyIndex.cpp b/src/libtomahawk/database/FuzzyIndex.cpp index 0a26de604..fa13bfe30 100644 --- a/src/libtomahawk/database/FuzzyIndex.cpp +++ b/src/libtomahawk/database/FuzzyIndex.cpp @@ -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 ) { diff --git a/src/libtomahawk/database/FuzzyIndex.h b/src/libtomahawk/database/FuzzyIndex.h index 47fe1bf5d..8a66b491b 100644 --- a/src/libtomahawk/database/FuzzyIndex.h +++ b/src/libtomahawk/database/FuzzyIndex.h @@ -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;