mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-02 04:10:20 +02:00
Fix crash in jreen and others by not processing events in infosystem's destructor. Instead, sleep for only 50ms at a time.
This commit is contained in:
@@ -90,8 +90,7 @@ InfoSystem::~InfoSystem()
|
|||||||
while( !m_worker.isNull() )
|
while( !m_worker.isNull() )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << " worker not deleted, processing events";
|
qDebug() << Q_FUNC_INFO << " worker not deleted, processing events";
|
||||||
QCoreApplication::processEvents( QEventLoop::AllEvents, 200 );
|
TomahawkUtils::Sleep::msleep( 50 );
|
||||||
TomahawkUtils::Sleep::msleep( 100 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_infoSystemWorkerThreadController )
|
if ( m_infoSystemWorkerThreadController )
|
||||||
@@ -102,8 +101,7 @@ InfoSystem::~InfoSystem()
|
|||||||
while( !m_infoSystemWorkerThreadController->isFinished() )
|
while( !m_infoSystemWorkerThreadController->isFinished() )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << " worker thread controller not finished, processing events";
|
qDebug() << Q_FUNC_INFO << " worker thread controller not finished, processing events";
|
||||||
QCoreApplication::processEvents( QEventLoop::AllEvents, 200 );
|
TomahawkUtils::Sleep::msleep( 50 );
|
||||||
TomahawkUtils::Sleep::msleep( 100 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete m_infoSystemWorkerThreadController;
|
delete m_infoSystemWorkerThreadController;
|
||||||
@@ -119,8 +117,7 @@ InfoSystem::~InfoSystem()
|
|||||||
while( !m_cache.isNull() )
|
while( !m_cache.isNull() )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << " worker not deleted, processing events";
|
qDebug() << Q_FUNC_INFO << " worker not deleted, processing events";
|
||||||
QCoreApplication::processEvents( QEventLoop::AllEvents, 200 );
|
TomahawkUtils::Sleep::msleep( 50 );
|
||||||
TomahawkUtils::Sleep::msleep( 100 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_infoSystemCacheThreadController )
|
if ( m_infoSystemCacheThreadController )
|
||||||
@@ -131,8 +128,7 @@ InfoSystem::~InfoSystem()
|
|||||||
while( !m_infoSystemCacheThreadController->isFinished() )
|
while( !m_infoSystemCacheThreadController->isFinished() )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << " worker thread controller not finished, processing events";
|
qDebug() << Q_FUNC_INFO << " worker thread controller not finished, processing events";
|
||||||
QCoreApplication::processEvents( QEventLoop::AllEvents, 200 );
|
TomahawkUtils::Sleep::msleep( 50 );
|
||||||
TomahawkUtils::Sleep::msleep( 100 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete m_infoSystemCacheThreadController;
|
delete m_infoSystemCacheThreadController;
|
||||||
|
Reference in New Issue
Block a user