mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
* Call wipeIndex via a single-shot timer to avoid dead-locks.
This commit is contained in:
@@ -190,7 +190,7 @@ FuzzyIndex::appendFields( const QMap< unsigned int, QMap< QString, QString > >&
|
|||||||
{
|
{
|
||||||
tDebug() << "Caught CLucene error:" << error.what();
|
tDebug() << "Caught CLucene error:" << error.what();
|
||||||
|
|
||||||
wipeIndex();
|
QTimer::singleShot( 0, this, SLOT( wipeIndex() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,9 +282,9 @@ FuzzyIndex::search( const Tomahawk::query_ptr& query )
|
|||||||
}
|
}
|
||||||
catch( CLuceneError& error )
|
catch( CLuceneError& error )
|
||||||
{
|
{
|
||||||
tDebug() << "Caught CLucene error:" << error.what();
|
tDebug() << "Caught CLucene error:" << error.what() << query->toString();
|
||||||
|
|
||||||
wipeIndex();
|
QTimer::singleShot( 0, this, SLOT( wipeIndex() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return resultsmap;
|
return resultsmap;
|
||||||
@@ -339,7 +339,7 @@ FuzzyIndex::searchAlbum( const Tomahawk::query_ptr& query )
|
|||||||
{
|
{
|
||||||
tDebug() << "Caught CLucene error:" << error.what();
|
tDebug() << "Caught CLucene error:" << error.what();
|
||||||
|
|
||||||
wipeIndex();
|
QTimer::singleShot( 0, this, SLOT( wipeIndex() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return resultsmap;
|
return resultsmap;
|
||||||
|
@@ -73,10 +73,9 @@ public slots:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateIndex();
|
void updateIndex();
|
||||||
|
|
||||||
private:
|
|
||||||
bool wipeIndex();
|
bool wipeIndex();
|
||||||
|
|
||||||
|
private:
|
||||||
QMutex m_mutex;
|
QMutex m_mutex;
|
||||||
QString m_lucenePath;
|
QString m_lucenePath;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user