From 1b4851a941cbafb7bf7a45feee7149cefa7e0acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 26 Oct 2016 18:12:33 +0200 Subject: NOISSUE use QtConcurrent to run FS operations in worker threads Not all operations - only the ones that aren't in error handling. The API for QFuture is too nasty to do much more in a sensible way. --- api/logic/InstanceCopyTask.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'api/logic/InstanceCopyTask.h') diff --git a/api/logic/InstanceCopyTask.h b/api/logic/InstanceCopyTask.h index a663ddbd..1ecf8313 100644 --- a/api/logic/InstanceCopyTask.h +++ b/api/logic/InstanceCopyTask.h @@ -4,10 +4,13 @@ #include "multimc_logic_export.h" #include "net/NetJob.h" #include +#include +#include #include "settings/SettingsObject.h" #include "BaseVersion.h" #include "BaseInstance.h" + class BaseInstanceProvider; class MULTIMC_LOGIC_EXPORT InstanceCopyTask : public Task @@ -20,6 +23,8 @@ public: protected: //! Entry point for tasks. virtual void executeTask() override; + void copyFinished(); + void copyAborted(); private: /* data */ SettingsObjectPtr m_globalSettings; @@ -28,7 +33,10 @@ private: /* data */ QString m_instName; QString m_instIcon; QString m_instGroup; + QString m_stagingPath; bool m_copySaves = false; + QFuture m_copyFuture; + QFutureWatcher m_copyFutureWatcher; }; -- cgit v1.2.3