From d3793d180c02a9375b2647ab2435b9d6a52981b0 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 22 Jul 2007 04:14:44 +0000 Subject: [PATCH] - Removed some useless debug in downloadThread and added a little more interesting one - Updated TODO --- TODO | 4 ++-- src/downloadThread.h | 9 +-------- src/rss.h | 5 +++-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/TODO b/TODO index e8e35a796..525aec417 100644 --- a/TODO +++ b/TODO @@ -39,10 +39,10 @@ - Fix all (or almost all) opened bugs in bug tracker - Fix column sorting with Qt 4.3 - Reported to Trolltech, waiting for their fix - update sorting when a new torrent is added? -- Allow to hide columns (gtsoul?) +- Allow to hide columns? - Complete documentation and english translation * beta3 - - Windows port (Chris - GTSoul - Peerkoel) + - Windows port (Chris - Peerkoel) - Translations update * beta2 - Improve RSS code + cleanup (chris) diff --git a/src/downloadThread.h b/src/downloadThread.h index c772ccc55..ca4dbde3d 100644 --- a/src/downloadThread.h +++ b/src/downloadThread.h @@ -68,11 +68,8 @@ class downloadThread : public QThread { void downloadUrl(const QString& url){ QMutexLocker locker(&mutex); - qDebug("In Download thread function, mutex locked"); url_list << url; - qDebug("In Download thread function, mutex unlocked (url added)"); if(!isRunning()){ - qDebug("In Download thread function, Launching thread (was stopped)"); start(); }else{ condition.wakeOne(); @@ -112,11 +109,9 @@ class downloadThread : public QThread { if(abort) return; mutex.lock(); - qDebug("In Download thread RUN, mutex locked"); if(url_list.size() != 0){ QString url = url_list.takeFirst(); mutex.unlock(); - qDebug("In Download thread RUN, mutex unlocked (got url)"); // XXX: Trick to get a unique filename QString filePath; QTemporaryFile *tmpfile = new QTemporaryFile(); @@ -151,12 +146,10 @@ class downloadThread : public QThread { dest_file.close(); url_stream.close(); emit downloadFinished(url, filePath); - qDebug("In Download thread RUN, signal emitted"); + qDebug("download completed here: %s", (const char*)filePath.toUtf8()); }else{ - qDebug("In Download thread RUN, mutex still locked (no urls) -> sleeping"); condition.wait(&mutex); mutex.unlock(); - qDebug("In Download thread RUN, woke up, mutex unlocked"); } } } diff --git a/src/rss.h b/src/rss.h index 430dbcbcf..1a12e2fe1 100644 --- a/src/rss.h +++ b/src/rss.h @@ -149,6 +149,7 @@ class RssStream : public QObject{ // display the icon in the rss window void displayIcon(const QString&, const QString& file_path) { iconPath = file_path; + qDebug("Icon tmp path is %s", (const char*) file_path.toUtf8()); openIcon(); emit refreshFinished(url, ICON); } @@ -175,8 +176,8 @@ class RssStream : public QObject{ delete downloaderIcon; if(QFile::exists(filePath)) QFile::remove(filePath); - if(QFile::exists(iconPath) && iconPath!=":/Icons/rss.png") - QFile::remove(iconPath); + if(QFile::exists(iconPath) && !iconPath.startsWith(":/")) + QFile::remove(iconPath); } // delete all the items saved