| 33 | } |
| 34 | |
| 35 | void InstanceCopyTask::copyFinished() |
| 36 | { |
| 37 | auto successful = m_copyFuture.result(); |
| 38 | if(!successful) |
| 39 | { |
| 40 | emitFailed(tr("Instance folder copy failed.")); |
| 41 | return; |
| 42 | } |
| 43 | // FIXME: shouldn't this be able to report errors? |
| 44 | auto instanceSettings = std::make_shared<INISettingsObject>(FS::PathCombine(m_stagingPath, "instance.cfg")); |
| 45 | instanceSettings->registerSetting("InstanceType", "Legacy"); |
| 46 | |
| 47 | InstancePtr inst(new NullInstance(m_globalSettings, instanceSettings, m_stagingPath)); |
| 48 | inst->setName(m_instName); |
| 49 | inst->setIconKey(m_instIcon); |
| 50 | if(!m_keepPlaytime) { |
| 51 | inst->resetTimePlayed(); |
| 52 | } |
| 53 | emitSucceeded(); |
| 54 | } |
| 55 | |
| 56 | void InstanceCopyTask::copyAborted() |
| 57 | { |
nothing calls this directly
no test coverage detected