- BUGFIX: Suppress compilation warning regarding sortNewsList() not being used

- bump to v1.5.5
This commit is contained in:
Christophe Dumez
2009-10-30 15:19:52 +00:00
parent 407c384494
commit 9dbc3a1540
7 changed files with 23 additions and 20 deletions

View File

@@ -2,6 +2,7 @@
- BUGFIX: Fixed man page
- BUGFIX: Fix crash on torrent addition (if libtorrent-rasterbar has debug enabled)
- BUGFIX: Fix trackers addition to torrents (bug introduced in v1.5.4)
- BUGFIX: Suppress compilation warning regarding sortNewsList() not being used
* Sun Oct 25 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.4
- BUGFIX: Updated man page

View File

@@ -1,6 +1,6 @@
[Desktop Entry]
Categories=Qt;Network;P2P;
Comment=V1.5.4
Comment=V1.5.5
Exec=qbittorrent %f
GenericName=Bittorrent client
GenericName[bg]=Торент клиент

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -604,7 +604,7 @@ void RssStream::resizeList() {
unsigned int max_articles = settings.value(QString::fromUtf8("Preferences/RSS/RSSMaxArticlesPerFeed"), 100).toInt();
unsigned int nb_articles = this->size();
if(nb_articles > max_articles) {
QList<RssItem*> listItem = sortNewsList(this->values());
QList<RssItem*> listItem = RssManager::sortNewsList(this->values());
int excess = nb_articles - max_articles;
for(int i=0; i<excess; ++i){
RssItem *lastItem = listItem.takeLast();

View File

@@ -492,23 +492,25 @@ public slots:
public:
RssManager(bittorrent *BTSession);
~RssManager();
};
static void insertSortElem(QList<RssItem*> &list, RssItem *item) {
static void insertSortElem(QList<RssItem*> &list, RssItem *item) {
int i = 0;
while(i < list.size() && item->getDate() < list.at(i)->getDate()) {
++i;
}
list.insert(i, item);
}
}
static QList<RssItem*> sortNewsList(QList<RssItem*> news_list) {
static QList<RssItem*> sortNewsList(QList<RssItem*> news_list) {
QList<RssItem*> new_list;
foreach(RssItem *item, news_list) {
insertSortElem(new_list, item);
}
return new_list;
}
}
};
#endif

View File

@@ -431,9 +431,9 @@ void RSSImp::refreshNewsList(QTreeWidgetItem* item) {
qDebug("Getting the list of news");
QList<RssItem*> news;
if(rss_item == rssmanager)
news = sortNewsList(rss_item->getUnreadNewsList());
news = RssManager::sortNewsList(rss_item->getUnreadNewsList());
else
news = sortNewsList(rss_item->getNewsList());
news = RssManager::sortNewsList(rss_item->getNewsList());
// Clear the list first
textBrowser->clear();
previous_news = 0;

View File

@@ -14,10 +14,10 @@ CONFIG += qt \
network
# Update this VERSION for each release
DEFINES += VERSION=\\\"v1.5.4\\\"
DEFINES += VERSION=\\\"v1.5.5\\\"
DEFINES += VERSION_MAJOR=1
DEFINES += VERSION_MINOR=5
DEFINES += VERSION_BUGFIX=4
DEFINES += VERSION_BUGFIX=5
!mac:QMAKE_LFLAGS += -Wl,--as-needed
contains(DEBUG_MODE, 1) {
CONFIG += debug