mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 00:47:21 -06:00
Fix possible crash in RSS selection code
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
- BUGFIX: Fix torrent moving after completion feature
|
- BUGFIX: Fix torrent moving after completion feature
|
||||||
- BUGFIX: Improved empty folder removing code
|
- BUGFIX: Improved empty folder removing code
|
||||||
- BUGFIX: Use guid or news url as RSS items identifier (instead of title)
|
- BUGFIX: Use guid or news url as RSS items identifier (instead of title)
|
||||||
|
- BUGFIX: Fix possible crash in RSS item selection code
|
||||||
- I18N: Added Croatian translation
|
- I18N: Added Croatian translation
|
||||||
|
|
||||||
* Sun Apr 18 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.2.6
|
* Sun Apr 18 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.2.6
|
||||||
|
|||||||
@@ -460,13 +460,13 @@ void RSSImp::refreshNewsList(QTreeWidgetItem* item) {
|
|||||||
void RSSImp::refreshTextBrowser() {
|
void RSSImp::refreshTextBrowser() {
|
||||||
QList<QTreeWidgetItem*> selection = listNews->selectedItems();
|
QList<QTreeWidgetItem*> selection = listNews->selectedItems();
|
||||||
if(selection.empty()) return;
|
if(selection.empty()) return;
|
||||||
|
Q_ASSERT(selection.size() == 1);
|
||||||
QTreeWidgetItem *item = selection.first();
|
QTreeWidgetItem *item = selection.first();
|
||||||
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) {
|
||||||
delete previous_news;
|
delete listNews->takeTopLevelItem(listNews->indexOfTopLevelItem(previous_news));
|
||||||
previous_news = 0;
|
|
||||||
}
|
}
|
||||||
previous_news = item;
|
previous_news = item;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,7 +125,10 @@ p, li { white-space: pre-wrap; }
|
|||||||
<enum>Qt::CustomContextMenu</enum>
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="selectionMode">
|
<property name="selectionMode">
|
||||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
<enum>QAbstractItemView::SingleSelection</enum>
|
||||||
|
</property>
|
||||||
|
<property name="selectionBehavior">
|
||||||
|
<enum>QAbstractItemView::SelectItems</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="rootIsDecorated">
|
<property name="rootIsDecorated">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@@ -136,6 +139,15 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="allColumnsShowFocus">
|
<property name="allColumnsShowFocus">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="expandsOnDoubleClick">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<attribute name="headerVisible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="headerStretchLastSection">
|
||||||
|
<bool>true</bool>
|
||||||
|
</attribute>
|
||||||
<attribute name="headerVisible">
|
<attribute name="headerVisible">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|||||||
Reference in New Issue
Block a user