diff options
author | TakSuyu <taksuyu@gmail.com> | 2013-07-27 12:55:51 -0700 |
---|---|---|
committer | TakSuyu <taksuyu@gmail.com> | 2013-07-27 12:55:51 -0700 |
commit | dc39d093396c9a0ed4f03d81f95fcc8fa5705b65 (patch) | |
tree | b88bf5fa692de82ce3418bdf5c55e9cd9eff37bc /libutil/include | |
parent | 44498f98945b7501486da35c5fdc32f94a2be080 (diff) | |
parent | a7a84d4dbb58565f108cb0886da6cb786e34d10d (diff) | |
download | MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.tar MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.tar.gz MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.tar.lz MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.tar.xz MultiMC-dc39d093396c9a0ed4f03d81f95fcc8fa5705b65.zip |
Merge remote-tracking branch 'upstream/master'
Conflicts:
gui/mainwindow.cpp
Diffstat (limited to 'libutil/include')
-rw-r--r-- | libutil/include/dlqueue.h | 9 | ||||
-rw-r--r-- | libutil/include/jobqueue.h | 7 |
2 files changed, 11 insertions, 5 deletions
diff --git a/libutil/include/dlqueue.h b/libutil/include/dlqueue.h index 9041e762..69fc22a6 100644 --- a/libutil/include/dlqueue.h +++ b/libutil/include/dlqueue.h @@ -5,13 +5,16 @@ /** * A single file for the downloader/cache to process. */ -class DownloadJob : public Job +class LIBUTIL_EXPORT DownloadJob : public Job { Q_OBJECT public: DownloadJob(QUrl url, QString rel_target_path = QString(), QString expected_md5 = QString()); static JobPtr create(QUrl url, QString rel_target_path = QString(), QString expected_md5 = QString()); + +public: + static bool ensurePathExists(QString filenamepath); public slots: virtual void start(); @@ -37,8 +40,10 @@ public: /// save to file? bool m_save_to_file; + /// is the saving file already open? + bool m_opened_for_saving; /// if saving to file, use the one specified in this string - QString m_rel_target_path; + QString m_target_path; /// this is the output file, if any QFile m_output_file; /// if not saving to file, downloaded data is placed here diff --git a/libutil/include/jobqueue.h b/libutil/include/jobqueue.h index 061686f6..26f49307 100644 --- a/libutil/include/jobqueue.h +++ b/libutil/include/jobqueue.h @@ -1,5 +1,6 @@ #pragma once #include <QtCore> +#include "libutil_config.h" enum JobStatus { @@ -11,7 +12,7 @@ enum JobStatus class JobList; -class Job : public QObject +class LIBUTIL_EXPORT Job : public QObject { Q_OBJECT protected: @@ -30,7 +31,7 @@ typedef QSharedPointer<Job> JobPtr; /** * A list of jobs, to be processed one by one. */ -class JobList : public QObject +class LIBUTIL_EXPORT JobList : public QObject { friend class JobListQueue; Q_OBJECT @@ -127,7 +128,7 @@ typedef QSharedPointer<JobList> JobListPtr; /** * A queue of job lists! The job lists fail or finish as units. */ -class JobListQueue : public QObject +class LIBUTIL_EXPORT JobListQueue : public QObject { Q_OBJECT public: |