mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
[RSS] More precise message and code simplification in RSS feeds deletion
This commit is contained in:
parent
2955bb5488
commit
7c6da30705
@ -249,21 +249,13 @@ void RSSImp::deleteSelectedItems()
|
|||||||
QList<QTreeWidgetItem*> selectedItems = m_feedList->selectedItems();
|
QList<QTreeWidgetItem*> selectedItems = m_feedList->selectedItems();
|
||||||
if (selectedItems.isEmpty())
|
if (selectedItems.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
if ((selectedItems.size() == 1) && (selectedItems.first() == m_feedList->stickyUnreadItem()))
|
||||||
|
return;
|
||||||
|
|
||||||
int ret;
|
QMessageBox::StandardButton answer = QMessageBox::question(this, tr("Deletion confirmation"),
|
||||||
if (selectedItems.size() > 1) {
|
tr("Are you sure you want to delete the selected RSS feeds?"),
|
||||||
ret = QMessageBox::question(this, tr("Are you sure? -- qBittorrent"), tr("Are you sure you want to delete these elements from the list?"),
|
QMessageBox::Yes|QMessageBox::No, QMessageBox::No);
|
||||||
tr("&Yes"), tr("&No"),
|
if (answer == QMessageBox::No)
|
||||||
QString(), 0, 1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (selectedItems.first() == m_feedList->stickyUnreadItem())
|
|
||||||
return;
|
|
||||||
ret = QMessageBox::question(this, tr("Are you sure? -- qBittorrent"), tr("Are you sure you want to delete this element from the list?"),
|
|
||||||
tr("&Yes"), tr("&No"),
|
|
||||||
QString(), 0, 1);
|
|
||||||
}
|
|
||||||
if (ret)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
foreach (QTreeWidgetItem* item, selectedItems) {
|
foreach (QTreeWidgetItem* item, selectedItems) {
|
||||||
|
Loading…
Reference in New Issue
Block a user