Move utilities to core/utils folder.

Also move the names to Utils namespace.
This commit is contained in:
Vladimir Golovnev (Glassez) 2015-05-06 14:53:27 +03:00
parent 427688cb34
commit 191cdc2849
67 changed files with 1172 additions and 1135 deletions

View file

@ -29,7 +29,7 @@
*/
#include "rssparser.h"
#include "core/fs_utils.h"
#include "core/utils/fs.h"
#include <QDebug>
#include <QFile>
@ -214,7 +214,7 @@ void RssParser::parseRssFile(const QString& feedUrl, const QString& filePath)
{
qDebug() << Q_FUNC_INFO << feedUrl << filePath;
m_mutex.lock();
ParsingJob job = { feedUrl, fsutils::fromNativePath(filePath) };
ParsingJob job = { feedUrl, Utils::Fs::fromNativePath(filePath) };
m_queue.enqueue(job);
// Wake up thread.
if (m_queue.count() == 1) {
@ -499,11 +499,11 @@ void RssParser::parseFeed(const ParsingJob& job)
// Clean up
fileRss.close();
emit feedParsingFinished(job.feedUrl, QString());
fsutils::forceRemove(job.filePath);
Utils::Fs::forceRemove(job.filePath);
}
void RssParser::reportFailure(const ParsingJob& job, const QString& error)
{
emit feedParsingFinished(job.feedUrl, error);
fsutils::forceRemove(job.filePath);
Utils::Fs::forceRemove(job.filePath);
}