pollymc/launcher/InstanceCopyTask.h
Marcelo Hernandez 63b6c6685c
Abstract away InstanceCopyPrefs' internals through new getSelectedFiltersAsRegex() function
+ fix typo in comment
+ remove unused import
+ add [[nodiscard]] to methods

Signed-off-by: Marcelo Hernandez <marcelohdez.inq@gmail.com>
2022-10-26 00:20:36 -04:00

34 lines
767 B
C++

#pragma once
#include <QFuture>
#include <QFutureWatcher>
#include <QUrl>
#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:
/* data */
InstancePtr m_origInstance;
QFuture<bool> m_copyFuture;
QFutureWatcher<bool> m_copyFutureWatcher;
std::unique_ptr<IPathMatcher> m_matcher;
bool m_keepPlaytime;
};