Browse Source

- Remove useless code

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
3550e31871
  1. 10
      src/rss_imp.cpp
  2. 1
      src/rss_imp.h

10
src/rss_imp.cpp

@ -247,7 +247,7 @@ void RSSImp::renameFiles() {
// Rename item // Rename item
rss_item->rename(newName); rss_item->rename(newName);
// Update TreeWidget // Update TreeWidget
item->setText(0, newName+ QString(" (")+QString::number(rss_item->getNbUnRead())+QString(")")); updateItemInfos(item);
} }
} }
@ -379,7 +379,8 @@ void RSSImp::refreshTextBrowser(QListWidgetItem *item) {
article->setRead(); article->setRead();
item->setData(Qt::ForegroundRole, QVariant(QColor("grey"))); item->setData(Qt::ForegroundRole, QVariant(QColor("grey")));
item->setData(Qt::DecorationRole, QVariant(QIcon(":/Icons/sphere.png"))); item->setData(Qt::DecorationRole, QVariant(QIcon(":/Icons/sphere.png")));
updateFeedNbNews(stream); // Decrement feed nb unread news
updateItemInfos(listStreams->currentFeed());
} }
void RSSImp::saveSlidersPosition() { void RSSImp::saveSlidersPosition() {
@ -421,11 +422,6 @@ void RSSImp::updateFeedIcon(QString url, QString icon_path){
item->setData(0,Qt::DecorationRole, QVariant(QIcon(icon_path))); item->setData(0,Qt::DecorationRole, QVariant(QIcon(icon_path)));
} }
void RSSImp::updateFeedNbNews(RssStream* stream){
QTreeWidgetItem *item = listStreams->getTreeItemFromUrl(stream->getUrl());
item->setText(0, stream->getName() + QString::fromUtf8(" (") + QString::number(stream->getNbUnRead(), 10)+ QString(")"));
}
void RSSImp::updateFeedInfos(QString url, QString aliasOrUrl, unsigned int nbUnread){ void RSSImp::updateFeedInfos(QString url, QString aliasOrUrl, unsigned int nbUnread){
QTreeWidgetItem *item = listStreams->getTreeItemFromUrl(url); QTreeWidgetItem *item = listStreams->getTreeItemFromUrl(url);
RssStream *stream = (RssStream*)listStreams->getRSSItem(item); RssStream *stream = (RssStream*)listStreams->getRSSItem(item);

1
src/rss_imp.h

@ -69,7 +69,6 @@ protected slots:
void downloadTorrent(); void downloadTorrent();
void fillFeedsList(QTreeWidgetItem *parent=0, RssFolder *rss_parent=0); void fillFeedsList(QTreeWidgetItem *parent=0, RssFolder *rss_parent=0);
void selectFirstFeed(); void selectFirstFeed();
void updateFeedNbNews(RssStream* stream);
void saveSlidersPosition(); void saveSlidersPosition();
void restoreSlidersPosition(); void restoreSlidersPosition();
void showFeedDownloader(); void showFeedDownloader();

Loading…
Cancel
Save