PrismLauncher/launcher/InstanceCreationTask.cpp
flow 941d75824a
refactor: add instance creation abstraction and move vanilla
This is so that 1. Code is more cleanly separated, and 2. Allows to more
easily add instance updating :)

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:32:36 -03:00

19 lines
438 B
C++

#include "InstanceCreationTask.h"
#include <QDebug>
InstanceCreationTask::InstanceCreationTask() {}
void InstanceCreationTask::executeTask()
{
if (updateInstance() || createInstance()) {
emitSucceeded();
return;
}
qWarning() << "Instance creation failed!";
if (!m_error_message.isEmpty())
qWarning() << "Reason: " << m_error_message;
emitFailed(tr("Error while creating new instance."));
}