mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Move utilities to core/utils folder.
Also move the names to Utils namespace.
This commit is contained in:
parent
427688cb34
commit
191cdc2849
67 changed files with 1172 additions and 1135 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue