diff --git a/TODO b/TODO
index 87e8255e7..3831e3044 100644
--- a/TODO
+++ b/TODO
@@ -44,4 +44,5 @@
- Write documentation
- Allow the user to see when peers were blocked thanks to IPFilter. Maybe in a file in order not to spam the GUI.
- Allow to scan multiple directories
-- Fix all (or almost all) opened bugs in bug tracker
\ No newline at end of file
+- Fix all (or almost all) opened bugs in bug tracker
+- Add an icon for encryption in program preferences
\ No newline at end of file
diff --git a/qBittorrent.kdevelop b/qBittorrent.kdevelop
index 059b261ec..2008b2486 100644
--- a/qBittorrent.kdevelop
+++ b/qBittorrent.kdevelop
@@ -13,8 +13,8 @@
.
false
-
-
+
+
kdevsubversion
@@ -72,11 +72,11 @@
-
-
-
-
-
+
+
+
+
+
true
false
false
@@ -154,8 +154,8 @@
executable
/home/chris/qbittorrent_svn/trunk/src/qbittorrent
-
-
+
+
/home/chris/qbittorrent_svn/trunk
true
false
@@ -169,7 +169,7 @@
false
1
false
-
+
0
diff --git a/src/FinishedTorrents.cpp b/src/FinishedTorrents.cpp
index 38bca0b03..efe81d8b7 100644
--- a/src/FinishedTorrents.cpp
+++ b/src/FinishedTorrents.cpp
@@ -279,16 +279,15 @@ int FinishedTorrents::getRowFromHash(const QString& hash) const{
// Will move it to download tab
void FinishedTorrents::deleteFromFinishedList(QString hash){
- finishedSHAs.removeAll(hash);
- QList items = finishedListModel->findItems(hash, Qt::MatchExactly, HASH );
- if(items.size() != 1){
- qDebug("Problem: Can't delete torrent from finished list");
- return;
+ int row = getRowFromHash(hash);
+ if(row == -1){
+ std::cerr << "Error: couldn't find hash in finished list\n";
}
- finishedListModel->removeRow(finishedListModel->indexFromItem(items.at(0)).row());
+ finishedListModel->removeRow(row);
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".finished");
--nbFinished;
((GUI*)parent)->setTabText(1, tr("Finished") +" ("+QString(misc::toString(nbFinished).c_str())+")");
+ finishedSHAs.removeAll(hash);
}
QTreeView* FinishedTorrents::getFinishedList(){
diff --git a/src/GUI.cpp b/src/GUI.cpp
index c61337552..10119f9ee 100644
--- a/src/GUI.cpp
+++ b/src/GUI.cpp
@@ -864,9 +864,10 @@ void GUI::on_actionOpen_triggered(){
void GUI::on_actionDelete_Permanently_triggered(){
if(tabs->currentIndex() > 1) return;
QModelIndexList selectedIndexes;
- bool inDownloadList = true;
+ bool inDownloadList;
if(tabs->currentIndex() == 0) {
selectedIndexes = downloadList->selectionModel()->selectedIndexes();
+ inDownloadList = true;
} else {
selectedIndexes = finishedTorrentTab->getFinishedList()->selectionModel()->selectedIndexes();
inDownloadList = false;