#pragma once #include #include #include #include "BaseInstance.h" #include "BaseVersion.h" #include "InstanceCopyPrefs.h" #include "InstanceTask.h" #include "net/NetJob.h" #include "settings/SettingsObject.h" #include "tasks/Task.h" class InstanceCopyTask : public InstanceTask { Q_OBJECT public: explicit InstanceCopyTask(InstancePtr origInstance, const InstanceCopyPrefs& prefs); protected: //! Entry point for tasks. virtual void executeTask() override; void copyFinished(); void copyAborted(); private: // Helper functions to avoid repeating code static void appendToFilter(QString &filter, const QString &append); void resetFromMatcher(const QString ®exp); /* data */ InstancePtr m_origInstance; QFuture m_copyFuture; QFutureWatcher m_copyFutureWatcher; std::unique_ptr m_matcher; bool m_keepPlaytime; };