mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-31 17:04:34 +00:00
- Move deletion from hard drive to a thread to avoid GUI freezing
This commit is contained in:
parent
f017d29359
commit
f4be28c014
@ -14,6 +14,7 @@
|
|||||||
- BUGFIX: Force a refresh of download list when the window is shown (avoid delay)
|
- BUGFIX: Force a refresh of download list when the window is shown (avoid delay)
|
||||||
- BUGFIX: Fixed deletion from hard drive (failed for non-empty folders)
|
- BUGFIX: Fixed deletion from hard drive (failed for non-empty folders)
|
||||||
- BUGFIX: qBittorrent now identifies its version correctly on the network
|
- BUGFIX: qBittorrent now identifies its version correctly on the network
|
||||||
|
- BUGFIX: Preventing GUI from freezing when deleting a download permanently
|
||||||
- COSMETIC: Replaced OSD messages by systray messages
|
- COSMETIC: Replaced OSD messages by systray messages
|
||||||
|
|
||||||
* Tue Nov 28 2006 - Christophe Dumez <chris@qbittorrent.org> - v0.8.0
|
* Tue Nov 28 2006 - Christophe Dumez <chris@qbittorrent.org> - v0.8.0
|
||||||
|
1
TODO
1
TODO
@ -36,6 +36,5 @@
|
|||||||
|
|
||||||
// In v0.9.0
|
// In v0.9.0
|
||||||
- Wait for libtorrent v0.12 official release
|
- Wait for libtorrent v0.12 official release
|
||||||
- Move deletion from hard drive to a thread to avoid GUI freezing
|
|
||||||
- Should create options dialog only when needed to save up some memory
|
- Should create options dialog only when needed to save up some memory
|
||||||
- Download from RSS feeds
|
- Download from RSS feeds
|
17
src/GUI.cpp
17
src/GUI.cpp
@ -1081,10 +1081,21 @@ void GUI::deletePermanently(){
|
|||||||
torrentBackup.remove(fileName+".incremental");
|
torrentBackup.remove(fileName+".incremental");
|
||||||
torrentBackup.remove(fileName+".pieces");
|
torrentBackup.remove(fileName+".pieces");
|
||||||
torrentBackup.remove(fileName+".savepath");
|
torrentBackup.remove(fileName+".savepath");
|
||||||
// Remove from Hard drive TODO
|
// Remove from Hard drive
|
||||||
qDebug("Removing this on hard drive: %s", qPrintable(savePath+QDir::separator()+fileName));
|
qDebug("Removing this on hard drive: %s", qPrintable(savePath+QDir::separator()+fileName));
|
||||||
if(!misc::removePath(savePath+QDir::separator()+fileName)){
|
// Deleting in a thread to avoid GUI freeze
|
||||||
qDebug("Couldn't remove the download on the hard drive");
|
deleteThread *deleter = new deleteThread(savePath+QDir::separator()+fileName);
|
||||||
|
deleters << deleter;
|
||||||
|
int i = 0;
|
||||||
|
while(i < deleters.size()){
|
||||||
|
deleter = deleters.at(i);
|
||||||
|
if(deleter->isFinished()){
|
||||||
|
qDebug("Delete thread has finished, deleting it");
|
||||||
|
deleters.removeAt(i);
|
||||||
|
delete deleter;
|
||||||
|
}else{
|
||||||
|
++i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Update info bar
|
// Update info bar
|
||||||
setInfoBar("'" + fileName +"' "+tr("removed.", "<file> removed."));
|
setInfoBar("'" + fileName +"' "+tr("removed.", "<file> removed."));
|
||||||
|
@ -43,6 +43,8 @@
|
|||||||
#include "about_imp.h"
|
#include "about_imp.h"
|
||||||
#include "previewSelect.h"
|
#include "previewSelect.h"
|
||||||
#include "trackerLogin.h"
|
#include "trackerLogin.h"
|
||||||
|
#include "deleteThread.h"
|
||||||
|
|
||||||
|
|
||||||
#define TIME_TRAY_BALLOON 5000
|
#define TIME_TRAY_BALLOON 5000
|
||||||
|
|
||||||
@ -72,6 +74,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
|||||||
downloadThread *downloader;
|
downloadThread *downloader;
|
||||||
downloadFromURL *downloadFromURLDialog;
|
downloadFromURL *downloadFromURLDialog;
|
||||||
bool DHTEnabled;
|
bool DHTEnabled;
|
||||||
|
QList<deleteThread*> deleters;
|
||||||
// GUI related
|
// GUI related
|
||||||
options_imp *options;
|
options_imp *options;
|
||||||
createtorrent *createWindow;
|
createtorrent *createWindow;
|
||||||
|
@ -102,7 +102,7 @@ HEADERS += GUI.h misc.h options_imp.h about_imp.h \
|
|||||||
PropListDelegate.h previewSelect.h \
|
PropListDelegate.h previewSelect.h \
|
||||||
PreviewListDelegate.h trackerLogin.h \
|
PreviewListDelegate.h trackerLogin.h \
|
||||||
downloadThread.h downloadFromURLImp.h \
|
downloadThread.h downloadFromURLImp.h \
|
||||||
torrentAddition.h
|
torrentAddition.h deleteThread.h
|
||||||
FORMS += MainWindow.ui options.ui about.ui \
|
FORMS += MainWindow.ui options.ui about.ui \
|
||||||
properties.ui createtorrent.ui preview.ui \
|
properties.ui createtorrent.ui preview.ui \
|
||||||
login.ui downloadFromURL.ui addTorrentDialog.ui
|
login.ui downloadFromURL.ui addTorrentDialog.ui
|
||||||
|
Loading…
x
Reference in New Issue
Block a user