OSDN Git Service

Make sure the "queued" slots in the FileAnalyzer thread are really executed in the...
authorLoRd_MuldeR <mulder2@gmx.de>
Sun, 17 Aug 2014 14:35:29 +0000 (16:35 +0200)
committerLoRd_MuldeR <mulder2@gmx.de>
Sun, 17 Aug 2014 14:35:29 +0000 (16:35 +0200)
src/Config.h
src/Thread_FileAnalyzer.cpp

index 2923513..45636f8 100644 (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
 
 ///////////////////////////////////////////////////////////////////////////////
index dd536fa..d3071c0 100644 (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();