From ff622e29c00eb91e5b98bde4c01c07c1f2553431 Mon Sep 17 00:00:00 2001 From: lordmulder Date: Thu, 28 Jul 2011 13:37:00 +0200 Subject: [PATCH] Fixed a bug that could files to be added twice. Files weren't actually added two times, because we have a check for duplicate files later, but the error message for unsupported/rejected files did pop up twice! --- src/Config.h | 2 +- src/Dialog_MainWindow.cpp | 18 +++++++++++------- src/Thread_FileAnalyzer.cpp | 1 - 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/Config.h b/src/Config.h index f20c2c7c..4f4eb7d8 100644 --- a/src/Config.h +++ b/src/Config.h @@ -30,7 +30,7 @@ #define VER_LAMEXP_MINOR_LO 3 #define VER_LAMEXP_TYPE Alpha #define VER_LAMEXP_PATCH 5 -#define VER_LAMEXP_BUILD 608 +#define VER_LAMEXP_BUILD 610 /////////////////////////////////////////////////////////////////////////////// // Tools versions diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index 2cf3bfa2..23914c2f 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -770,11 +770,13 @@ void MainWindow::dropEvent(QDropEvent *event) } if(file.isFile()) { + qDebug64("Dropped File: %1", file.canonicalFilePath()); droppedFiles << file.canonicalFilePath(); continue; } - if(file.isDir()) + else if(file.isDir()) { + qDebug64("Dropped Folder: %1", file.canonicalFilePath()); QList list = QDir(file.canonicalFilePath()).entryInfoList(QDir::Files); for(int j = 0; j < list.count(); j++) { @@ -2838,15 +2840,17 @@ void MainWindow::addFilesDelayed(const QStringList &filePaths, bool tryASAP) { if(tryASAP && !m_delayedFileTimer->isActive()) { - qDebug("Received %d files.", filePaths.count()); + qDebug("Received %d file(s).", filePaths.count()); m_delayedFileList->append(filePaths); QTimer::singleShot(0, this, SLOT(handleDelayedFiles())); } - - m_delayedFileTimer->stop(); - qDebug("Received %d files.", filePaths.count()); - m_delayedFileList->append(filePaths); - m_delayedFileTimer->start(5000); + else + { + m_delayedFileTimer->stop(); + qDebug("Received %d file(s).", filePaths.count()); + m_delayedFileList->append(filePaths); + m_delayedFileTimer->start(5000); + } } /* diff --git a/src/Thread_FileAnalyzer.cpp b/src/Thread_FileAnalyzer.cpp index 0bd0fcf8..21c7aeda 100644 --- a/src/Thread_FileAnalyzer.cpp +++ b/src/Thread_FileAnalyzer.cpp @@ -77,7 +77,6 @@ void FileAnalyzer::run() m_filesCueSheet = 0; m_inputFiles.sort(); - m_abortFlag = false; while(!m_inputFiles.isEmpty())