2016-10-02 23:55:54 +01:00
|
|
|
#include "InstanceCreationTask.h"
|
|
|
|
|
2022-07-08 00:31:24 +01:00
|
|
|
#include <QDebug>
|
2016-10-02 23:55:54 +01:00
|
|
|
|
2022-07-08 00:31:24 +01:00
|
|
|
InstanceCreationTask::InstanceCreationTask() {}
|
2016-10-02 23:55:54 +01:00
|
|
|
|
|
|
|
void InstanceCreationTask::executeTask()
|
|
|
|
{
|
2022-07-08 00:31:24 +01:00
|
|
|
if (updateInstance() || createInstance()) {
|
|
|
|
emitSucceeded();
|
|
|
|
return;
|
2018-07-15 13:51:05 +01:00
|
|
|
}
|
2022-07-08 00:31:24 +01:00
|
|
|
|
|
|
|
qWarning() << "Instance creation failed!";
|
|
|
|
if (!m_error_message.isEmpty())
|
|
|
|
qWarning() << "Reason: " << m_error_message;
|
|
|
|
emitFailed(tr("Error while creating new instance."));
|
2016-10-02 23:55:54 +01:00
|
|
|
}
|