Delete temporary after they aren't needed. Closes #1188.

This commit is contained in:
sledgehammer999
2014-01-02 22:43:17 +02:00
parent 4158465109
commit f93374a946
6 changed files with 12 additions and 5 deletions

View File

@@ -629,6 +629,7 @@ void RSSImp::updateFeedIcon(const QString& url, const QString& iconPath)
{
QTreeWidgetItem* item = m_feedList->getTreeItemFromUrl(url);
item->setData(0, Qt::DecorationRole, QVariant(QIcon(iconPath)));
fsutils::forceRemove(iconPath);
}
void RSSImp::updateFeedInfos(const QString& url, const QString& display_name, uint nbUnread)

View File

@@ -30,6 +30,7 @@
#include "rssparser.h"
#include "downloadthread.h"
#include "fs_utils.h"
#include <QDebug>
#include <QFile>
#include <QRegExp>
@@ -496,12 +497,13 @@ void RssParser::parseFeed(const ParsingJob& job)
}
// Clean up
QFile::remove(job.filePath);
fileRss.close();
emit feedParsingFinished(job.feedUrl, QString());
fsutils::forceRemove(job.filePath);
}
void RssParser::reportFailure(const ParsingJob& job, const QString& error)
{
QFile::remove(job.filePath);
emit feedParsingFinished(job.feedUrl, error);
fsutils::forceRemove(job.filePath);
}