Code clean up

This commit is contained in:
Christophe Dumez
2011-01-24 18:11:25 +00:00
parent 35e36036be
commit 66ee39df9a
11 changed files with 28 additions and 33 deletions

View File

@@ -313,11 +313,11 @@ short RssFeed::readDoc(QIODevice* device) {
}
void RssFeed::resizeList() {
unsigned int max_articles = RssSettings().getRSSMaxArticlesPerFeed();
unsigned int nb_articles = this->size();
const unsigned int max_articles = RssSettings().getRSSMaxArticlesPerFeed();
const unsigned int nb_articles = this->size();
if(nb_articles > max_articles) {
QList<RssArticle*> listItem = RssManager::sortNewsList(this->values());
int excess = nb_articles - max_articles;
const int excess = nb_articles - max_articles;
for(int i=0; i<excess; ++i){
RssArticle *lastItem = listItem.takeLast();
delete this->take(lastItem->getId());

View File

@@ -38,7 +38,7 @@
#include "rssfeed.h"
RssFolder::RssFolder(RssFolder *parent, QString name): parent(parent), name(name) {
downloader = new downloadThread(this);
downloader = new DownloadThread(this);
connect(downloader, SIGNAL(downloadFinished(QString, QString)), this, SLOT(processFinishedDownload(QString, QString)));
connect(downloader, SIGNAL(downloadFailure(QString, QString)), this, SLOT(handleDownloadFailure(QString, QString)));
}

View File

@@ -36,7 +36,7 @@
#include "rssfile.h"
class RssArticle;
class downloadThread;
class DownloadThread;
class RssFeed;
class RssFolder: public RssFile, public QHash<QString, RssFile*> {
@@ -77,7 +77,7 @@ public slots:
private:
RssFolder *parent;
downloadThread *downloader;
DownloadThread *downloader;
QString name;
};