summaryrefslogtreecommitdiffstats
path: root/libutil/src
diff options
context:
space:
mode:
Diffstat (limited to 'libutil/src')
-rw-r--r--libutil/src/dlqueue.cpp8
-rw-r--r--libutil/src/pathutils.cpp8
2 files changed, 9 insertions, 7 deletions
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 <include/pathutils.h>
DownloadJob::DownloadJob (QUrl url,
QString target_path,
@@ -48,13 +49,6 @@ JobPtr DownloadJob::create (QSharedPointer<QNetworkAccessManager> 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() ));
+}
+