- Removed some useless debug in downloadThread and added a little more interesting one

- Updated TODO
This commit is contained in:
Christophe Dumez 2007-07-22 04:14:44 +00:00
parent e1e28fa9ff
commit d3793d180c
3 changed files with 6 additions and 12 deletions

4
TODO
View File

@ -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)

View File

@ -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");
}
}
}

View File

@ -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,7 +176,7 @@ class RssStream : public QObject{
delete downloaderIcon;
if(QFile::exists(filePath))
QFile::remove(filePath);
if(QFile::exists(iconPath) && iconPath!=":/Icons/rss.png")
if(QFile::exists(iconPath) && !iconPath.startsWith(":/"))
QFile::remove(iconPath);
}