mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-05 15:12:32 -06:00
BUGFIX: Fix possible crash when selecting a RSS item (really closes #575624)
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.4.10
|
||||||
|
- BUGFIX: Fix possible crash when selecting a RSS item (really closes #575624)
|
||||||
|
|
||||||
* Sun Oct 31 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.9
|
* Sun Oct 31 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.9
|
||||||
- BUGFIX: Fix crash when pressing enter in save path field in torrent addition dialog
|
- BUGFIX: Fix crash when pressing enter in save path field in torrent addition dialog
|
||||||
- BUGFIX: Fix crash when deleting a torrent with no metadata (closes #667528)
|
- BUGFIX: Fix crash when deleting a torrent with no metadata (closes #667528)
|
||||||
|
|||||||
@@ -481,11 +481,16 @@ void RSSImp::refreshTextBrowser() {
|
|||||||
if(selection.empty()) return;
|
if(selection.empty()) return;
|
||||||
Q_ASSERT(selection.size() == 1);
|
Q_ASSERT(selection.size() == 1);
|
||||||
QTreeWidgetItem *item = selection.first();
|
QTreeWidgetItem *item = selection.first();
|
||||||
|
Q_ASSERT(item);
|
||||||
if(item == previous_news) return;
|
if(item == previous_news) return;
|
||||||
// Stop displaying previous news if necessary
|
// Stop displaying previous news if necessary
|
||||||
if(listStreams->currentFeed() == listStreams->getUnreadItem()) {
|
if(listStreams->currentFeed() == listStreams->getUnreadItem()) {
|
||||||
if(previous_news) {
|
if(previous_news) {
|
||||||
|
disconnect(listNews, SIGNAL(itemSelectionChanged()), this, SLOT(refreshTextBrowser()));
|
||||||
|
listNews->removeItemWidget(previous_news, 0);
|
||||||
|
Q_ASSERT(previous_news);
|
||||||
delete previous_news;
|
delete previous_news;
|
||||||
|
connect(listNews, SIGNAL(itemSelectionChanged()), this, SLOT(refreshTextBrowser()));
|
||||||
}
|
}
|
||||||
previous_news = item;
|
previous_news = item;
|
||||||
}
|
}
|
||||||
@@ -590,6 +595,8 @@ RSSImp::RSSImp(Bittorrent *BTSession) : QWidget(), BTSession(BTSession){
|
|||||||
splitter_h->insertWidget(0, listStreams);
|
splitter_h->insertWidget(0, listStreams);
|
||||||
listNews->hideColumn(NEWS_URL_COL);
|
listNews->hideColumn(NEWS_URL_COL);
|
||||||
listNews->setColumnWidth(0, 16);
|
listNews->setColumnWidth(0, 16);
|
||||||
|
listNews->setSelectionBehavior(QAbstractItemView::SelectItems);
|
||||||
|
listNews->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||||
|
|
||||||
fillFeedsList();
|
fillFeedsList();
|
||||||
refreshNewsList(listStreams->currentItem());
|
refreshNewsList(listStreams->currentItem());
|
||||||
|
|||||||
Reference in New Issue
Block a user