Browse Source

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

- Updated TODO
adaptive-webui-19844
Christophe Dumez 18 years ago
parent
commit
d3793d180c
  1. 4
      TODO
  2. 9
      src/downloadThread.h
  3. 5
      src/rss.h

4
TODO

@ -39,10 +39,10 @@ @@ -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)

9
src/downloadThread.h

@ -68,11 +68,8 @@ class downloadThread : public QThread { @@ -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 { @@ -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 { @@ -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");
}
}
}

5
src/rss.h

@ -149,6 +149,7 @@ class RssStream : public QObject{ @@ -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{ @@ -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

Loading…
Cancel
Save