From 183a7351456940d01f14a49112ddeb68ffc4693a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 5 Aug 2013 03:29:50 +0200 Subject: Runnable 1.6 instances! --- libutil/include/dlqueue.h | 2 -- libutil/include/pathutils.h | 2 ++ libutil/src/dlqueue.cpp | 8 +------- libutil/src/pathutils.cpp | 8 ++++++++ 4 files changed, 11 insertions(+), 9 deletions(-) (limited to 'libutil') diff --git a/libutil/include/dlqueue.h b/libutil/include/dlqueue.h index cdb6a818..015f4dee 100644 --- a/libutil/include/dlqueue.h +++ b/libutil/include/dlqueue.h @@ -26,8 +26,6 @@ public: QString expected_md5 = QString() ); -public: - static bool ensurePathExists(QString filenamepath); public slots: virtual void start(); diff --git a/libutil/include/pathutils.h b/libutil/include/pathutils.h index c04330a9..c9a52ced 100644 --- a/libutil/include/pathutils.h +++ b/libutil/include/pathutils.h @@ -29,4 +29,6 @@ LIBUTIL_EXPORT QString RemoveInvalidFilenameChars(QString string, QChar replaceW LIBUTIL_EXPORT QString DirNameFromString(QString string, QString inDir = "."); +LIBUTIL_EXPORT bool ensurePathExists(QString filenamepath); + #endif // PATHUTILS_H diff --git a/libutil/src/dlqueue.cpp b/libutil/src/dlqueue.cpp index d73dc356..65e0e31e 100644 --- a/libutil/src/dlqueue.cpp +++ b/libutil/src/dlqueue.cpp @@ -1,4 +1,5 @@ #include "include/dlqueue.h" +#include DownloadJob::DownloadJob (QUrl url, QString target_path, @@ -48,13 +49,6 @@ JobPtr DownloadJob::create (QSharedPointer net_mgr, return JobPtr ( new DownloadJob ( net_mgr, url, target_path, expected_md5 ) ); } -bool DownloadJob::ensurePathExists(QString filenamepath) -{ - QFileInfo a ( filenamepath ); - QDir dir; - return (dir.mkpath ( a.path() )); -} - void DownloadJob::start() { if ( m_save_to_file ) diff --git a/libutil/src/pathutils.cpp b/libutil/src/pathutils.cpp index 7ba7397c..083fe98d 100644 --- a/libutil/src/pathutils.cpp +++ b/libutil/src/pathutils.cpp @@ -65,3 +65,11 @@ QString DirNameFromString(QString string, QString inDir) } return dirName; } + +bool ensurePathExists(QString filenamepath) +{ + QFileInfo a ( filenamepath ); + QDir dir; + return (dir.mkpath ( a.path() )); +} + -- cgit v1.2.3