mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 00:47:21 -06:00
- BUGFIX: Ignore permanent deletion button when no torrent is selected
- BUGFIX: When a selected torrent is deleted, select next suitable torrent - Bump to v1.5.3
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.5.3
|
||||
* Wed Sep 30 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.3
|
||||
- BUGFIX: Fix a possible crash when pausing then deleting a torrent quickly
|
||||
- BUGFIX: Fix a race condition in folder scanning and torrent downloader
|
||||
- BUGFIX: Hide download url column in search results
|
||||
- BUGFIX: Fix a crash when scanned directory does not exist
|
||||
- BUGFIX: Fix compilation on Mac OS
|
||||
- BUGFIX: Added a command line parameter to disable splash screen
|
||||
- BUGFIX: Ignore permanent deletion button when no torrent is selected
|
||||
- BUGFIX: When a selected torrent is deleted, select next suitable torrent
|
||||
|
||||
* Sun Sep 20 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.2
|
||||
- BUGFIX: Some torrents were pausing for no reason
|
||||
|
||||
@@ -383,6 +383,20 @@ void FinishedTorrents::deleteTorrent(QString hash){
|
||||
qDebug("Torrent is not in finished list, nothing to delete");
|
||||
return;
|
||||
}
|
||||
// Select item just under (or above nothing under) the one that was deleted
|
||||
QModelIndex current_prox_index = proxyModel->mapFromSource(finishedListModel->index(row, 0, finishedList->rootIndex()));
|
||||
bool was_selected = finishedList->selectionModel()->isSelected(current_prox_index);
|
||||
if(finishedListModel->rowCount() > 1 && was_selected) {
|
||||
QModelIndex under_prox_index;
|
||||
if(current_prox_index.row() == finishedListModel->rowCount()-1)
|
||||
under_prox_index = proxyModel->index(current_prox_index.row()-1, 0);
|
||||
else
|
||||
under_prox_index = proxyModel->index(current_prox_index.row()+1, 0);
|
||||
//downloadList->selectionModel()->select(under_prox_index, QItemSelectionModel::Current|QItemSelectionModel::Columns|QItemSelectionModel::Select);
|
||||
finishedList->setCurrentIndex(under_prox_index);
|
||||
finishedList->update();
|
||||
}
|
||||
// Actually delete the row
|
||||
finishedListModel->removeRow(row);
|
||||
--nbFinished;
|
||||
emit finishedTorrentsNumberChanged(nbFinished);
|
||||
|
||||
@@ -868,6 +868,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
default:
|
||||
return;
|
||||
}
|
||||
if(hashes.empty()) return;
|
||||
int ret;
|
||||
if(inDownloadList) {
|
||||
ret = QMessageBox::question(
|
||||
@@ -919,7 +920,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
default:
|
||||
return;
|
||||
}
|
||||
if(!hashes.size()) return;
|
||||
if(hashes.empty()) return;
|
||||
int ret;
|
||||
if(inDownloadList) {
|
||||
ret = QMessageBox::question(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Categories=Qt;Network;P2P;
|
||||
Comment=V1.5.2
|
||||
Comment=V1.5.3
|
||||
Exec=qbittorrent %f
|
||||
GenericName=Bittorrent client
|
||||
GenericName[bg]=Торент клиент
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
@@ -198,6 +198,20 @@ void DownloadingTorrents::deleteTorrent(QString hash) {
|
||||
qDebug("torrent is not in download list, nothing to delete");
|
||||
return;
|
||||
}
|
||||
// Select item just under (or above nothing under) the one that was deleted
|
||||
QModelIndex current_prox_index = proxyModel->mapFromSource(DLListModel->index(row, 0, downloadList->rootIndex()));
|
||||
bool was_selected = downloadList->selectionModel()->isSelected(current_prox_index);
|
||||
if(DLListModel->rowCount() > 1 && was_selected) {
|
||||
QModelIndex under_prox_index;
|
||||
if(current_prox_index.row() == DLListModel->rowCount()-1)
|
||||
under_prox_index = proxyModel->index(current_prox_index.row()-1, 0);
|
||||
else
|
||||
under_prox_index = proxyModel->index(current_prox_index.row()+1, 0);
|
||||
//downloadList->selectionModel()->select(under_prox_index, QItemSelectionModel::Current|QItemSelectionModel::Columns|QItemSelectionModel::Select);
|
||||
downloadList->setCurrentIndex(under_prox_index);
|
||||
downloadList->update();
|
||||
}
|
||||
// Actually delete the row
|
||||
DLListModel->removeRow(row);
|
||||
--nbTorrents;
|
||||
emit unfinishedTorrentsNumberChanged(nbTorrents);
|
||||
|
||||
@@ -14,10 +14,10 @@ CONFIG += qt \
|
||||
network
|
||||
|
||||
# Update this VERSION for each release
|
||||
DEFINES += VERSION=\\\"v1.5.2\\\"
|
||||
DEFINES += VERSION=\\\"v1.5.3\\\"
|
||||
DEFINES += VERSION_MAJOR=1
|
||||
DEFINES += VERSION_MINOR=5
|
||||
DEFINES += VERSION_BUGFIX=2
|
||||
DEFINES += VERSION_BUGFIX=3
|
||||
!mac:QMAKE_LFLAGS += -Wl,--as-needed
|
||||
contains(DEBUG_MODE, 1) {
|
||||
CONFIG += debug
|
||||
|
||||
Reference in New Issue
Block a user