Make sure the "queued" slots in the FileAnalyzer thread are really executed in the context of the proper thread.

This commit is contained in:
LoRd_MuldeR 2014-08-17 16:35:29 +02:00
parent 0be5c1d24c
commit 2a29e1ae94
2 changed files with 5 additions and 7 deletions

View File

@ -34,8 +34,8 @@
#define VER_LAMEXP_MINOR_HI 1
#define VER_LAMEXP_MINOR_LO 1
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 1
#define VER_LAMEXP_BUILD 1567
#define VER_LAMEXP_PATCH 2
#define VER_LAMEXP_BUILD 1570
#define VER_LAMEXP_CONFG 1558
///////////////////////////////////////////////////////////////////////////////

View File

@ -71,6 +71,8 @@ FileAnalyzer::FileAnalyzer(const QStringList &inputFiles)
m_filesDummyCDDA = 0;
m_filesCueSheet = 0;
moveToThread(this); /*makes sure queued slots are executed in the proper thread context*/
m_timer = new QElapsedTimer;
}
@ -154,10 +156,6 @@ void FileAnalyzer::run()
m_timer->invalidate();
//Update progress
//emit progressMaxChanged(m_inputFiles.count());
//emit progressValChanged(0);
//Create MediaInfo template file
if(!m_templateFile)
{
@ -240,7 +238,7 @@ bool FileAnalyzer::analyzeNextFile(void)
const unsigned int taskId = m_tasksCounterNext++;
const QString currentFile = QDir::fromNativeSeparators(m_inputFiles.takeFirst());
if((!m_timer->isValid()) || (m_timer->elapsed() >= 250))
if((!m_timer->isValid()) || (m_timer->elapsed() >= 333))
{
emit fileSelected(QFileInfo(currentFile).fileName());
m_timer->restart();