From f93f867c3da084c6d6c5e3ed23896609cff0e692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 5 Oct 2015 01:47:27 +0200 Subject: NOISSUE dissolve util library --- logic/net/CacheDownload.cpp | 4 ++-- logic/net/HttpMetaCache.cpp | 5 ++--- logic/net/MD5EtagDownload.cpp | 4 ++-- logic/net/NetJob.cpp | 1 - 4 files changed, 6 insertions(+), 8 deletions(-) (limited to 'logic/net') diff --git a/logic/net/CacheDownload.cpp b/logic/net/CacheDownload.cpp index b125a3d9..1d48170a 100644 --- a/logic/net/CacheDownload.cpp +++ b/logic/net/CacheDownload.cpp @@ -14,13 +14,13 @@ */ #include "CacheDownload.h" -#include #include #include #include #include #include "Env.h" +#include CacheDownload::CacheDownload(QUrl url, MetaEntryPtr entry) : NetAction(), md5sum(QCryptographicHash::Md5) @@ -44,7 +44,7 @@ void CacheDownload::start() m_output_file.reset(new QSaveFile(m_target_path)); // if there already is a file and md5 checking is in effect and it can be opened - if (!ensureFilePathExists(m_target_path)) + if (!FS::ensureFilePathExists(m_target_path)) { qCritical() << "Could not create folder for " + m_target_path; m_status = Job_Failed; diff --git a/logic/net/HttpMetaCache.cpp b/logic/net/HttpMetaCache.cpp index 977e3a90..3d6aef0d 100644 --- a/logic/net/HttpMetaCache.cpp +++ b/logic/net/HttpMetaCache.cpp @@ -16,7 +16,6 @@ #include "Env.h" #include "HttpMetaCache.h" #include "FileSystem.h" -#include #include #include @@ -33,7 +32,7 @@ QString MetaEntry::getFullPath() { // FIXME: make local? - return PathCombine(ENV.metacache()->getBasePath(base), path); + return FS::PathCombine(ENV.metacache()->getBasePath(base), path); } HttpMetaCache::HttpMetaCache(QString path) : QObject() @@ -77,7 +76,7 @@ MetaEntryPtr HttpMetaCache::resolveEntry(QString base, QString resource_path, } auto &selected_base = m_entries[base]; - QString real_path = PathCombine(selected_base.base_path, resource_path); + QString real_path = FS::PathCombine(selected_base.base_path, resource_path); QFileInfo finfo(real_path); // is the file really there? if not -> stale diff --git a/logic/net/MD5EtagDownload.cpp b/logic/net/MD5EtagDownload.cpp index 7593c87e..3b4d5dcd 100644 --- a/logic/net/MD5EtagDownload.cpp +++ b/logic/net/MD5EtagDownload.cpp @@ -15,7 +15,7 @@ #include "Env.h" #include "MD5EtagDownload.h" -#include +#include #include #include @@ -55,7 +55,7 @@ void MD5EtagDownload::start() // no expected md5. we use the local md5sum as an ETag } } - if (!ensureFilePathExists(filename)) + if (!FS::ensureFilePathExists(filename)) { emit failed(m_index_within_job); return; diff --git a/logic/net/NetJob.cpp b/logic/net/NetJob.cpp index 52307e2a..76c61c35 100644 --- a/logic/net/NetJob.cpp +++ b/logic/net/NetJob.cpp @@ -14,7 +14,6 @@ */ #include "NetJob.h" -#include "pathutils.h" #include "MD5EtagDownload.h" #include "ByteArrayDownload.h" #include "CacheDownload.h" -- cgit v1.2.3