mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-09-08 03:52:26 +00:00
Properly clear ArticleListWidget
This commit is contained in:
parent
fc0c28d376
commit
4e37688105
@ -164,6 +164,8 @@ QList<QTreeWidgetItem *> FeedListWidget::getAllOpenedFolders(QTreeWidgetItem *pa
|
|||||||
|
|
||||||
RSS::Item *FeedListWidget::getRSSItem(QTreeWidgetItem *item) const
|
RSS::Item *FeedListWidget::getRSSItem(QTreeWidgetItem *item) const
|
||||||
{
|
{
|
||||||
|
if (!item) return nullptr;
|
||||||
|
|
||||||
return reinterpret_cast<RSS::Item *>(item->data(0, Qt::UserRole).value<quintptr>());
|
return reinterpret_cast<RSS::Item *>(item->data(0, Qt::UserRole).value<quintptr>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,11 +416,6 @@ void RSSWidget::copySelectedFeedsURL()
|
|||||||
|
|
||||||
void RSSWidget::handleCurrentFeedItemChanged(QTreeWidgetItem *currentItem)
|
void RSSWidget::handleCurrentFeedItemChanged(QTreeWidgetItem *currentItem)
|
||||||
{
|
{
|
||||||
if (!currentItem) {
|
|
||||||
m_articleListWidget->clear();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_articleListWidget->setRSSItem(m_feedListWidget->getRSSItem(currentItem)
|
m_articleListWidget->setRSSItem(m_feedListWidget->getRSSItem(currentItem)
|
||||||
, (currentItem == m_feedListWidget->stickyUnreadItem()));
|
, (currentItem == m_feedListWidget->stickyUnreadItem()));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user