|
|
@ -249,11 +249,17 @@ void RSSImp::deleteSelectedItems() { |
|
|
|
listArticles->clear(); |
|
|
|
listArticles->clear(); |
|
|
|
} |
|
|
|
} |
|
|
|
IRssFile *rss_item = m_feedList->getRSSItem(item); |
|
|
|
IRssFile *rss_item = m_feedList->getRSSItem(item); |
|
|
|
|
|
|
|
QTreeWidgetItem * parent = item->parent(); |
|
|
|
// Notify TreeWidget
|
|
|
|
// Notify TreeWidget
|
|
|
|
m_feedList->itemAboutToBeRemoved(item); |
|
|
|
m_feedList->itemAboutToBeRemoved(item); |
|
|
|
// Actually delete the item
|
|
|
|
// Actually delete the item
|
|
|
|
rss_item->parent()->removeChild(rss_item->id()); |
|
|
|
rss_item->parent()->removeChild(rss_item->id()); |
|
|
|
delete item; |
|
|
|
delete item; |
|
|
|
|
|
|
|
// Update parents count
|
|
|
|
|
|
|
|
while (parent && parent != m_feedList->invisibleRootItem()) { |
|
|
|
|
|
|
|
updateItemInfos (parent); |
|
|
|
|
|
|
|
parent = parent->parent(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
m_rssManager->saveStreamList(); |
|
|
|
m_rssManager->saveStreamList(); |
|
|
|
// Update Unread items
|
|
|
|
// Update Unread items
|
|
|
@ -549,6 +555,9 @@ void RSSImp::updateItemsInfos(const QList<QTreeWidgetItem *> &items) { |
|
|
|
|
|
|
|
|
|
|
|
void RSSImp::updateItemInfos(QTreeWidgetItem *item) { |
|
|
|
void RSSImp::updateItemInfos(QTreeWidgetItem *item) { |
|
|
|
IRssFile *rss_item = m_feedList->getRSSItem(item); |
|
|
|
IRssFile *rss_item = m_feedList->getRSSItem(item); |
|
|
|
|
|
|
|
if (!rss_item) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
QString name; |
|
|
|
QString name; |
|
|
|
if(rss_item == m_rssManager) |
|
|
|
if(rss_item == m_rssManager) |
|
|
|
name = tr("Unread"); |
|
|
|
name = tr("Unread"); |
|
|
|