JobPtr Job::loadJob(Util::ConfigFile &settings) { auto jobType = settings.value("jobType"); if (jobType == "MuxJob") return MuxJob::loadMuxJob(settings); Q_ASSERT_X(false, "Job::loadJob", "Unknown job type encountered"); return JobPtr{}; }
void Job::loadJobBasis(Util::ConfigFile &settings) { m_modified = false; m_uuid = settings.value("uuid").toUuid(); m_status = static_cast<Status>(settings.value("status", static_cast<unsigned int>(PendingManual)).toUInt()); m_description = settings.value("description").toString(); m_output = settings.value("output").toStringList(); m_warnings = settings.value("warnings").toStringList(); m_errors = settings.value("errors").toStringList(); m_fullOutput = settings.value("fullOutput").toStringList(); m_progress = settings.value("progress").toUInt(); m_exitCode = settings.value("exitCode").toUInt(); m_warningsAcknowledged = settings.value("warningsAcknowledged", 0).toUInt(); m_errorsAcknowledged = settings.value("errorsAcknowledged", 0).toUInt(); m_dateAdded = settings.value("dateAdded").toDateTime(); m_dateStarted = settings.value("dateStarted").toDateTime(); m_dateFinished = settings.value("dateFinished").toDateTime(); if (m_uuid.isNull()) m_uuid = QUuid::createUuid(); if (Running == m_status) m_status = Aborted; }