Migrates AudioVideoManagement to generated rtiddsgen API
Converts accessor calls to plain member access across avm service and plugin.
This commit is contained in:
29 files changed
+308
-295
No files matched your search
+8
-8
@@ -86,8 +86,8 @@ Database::AvmFrequencyPlanning toDb(const FrequencyPlanning &ddsPlan)
|
||||
{
|
||||
Database::AvmFrequencyPlanning dbPlan;
|
||||
dbPlan.id = ddsPlan.id();
|
||||
if (ddsPlan.exerciseId().is_set())
|
||||
dbPlan.exerciseId = ddsPlan.exerciseId().get();
|
||||
if (ddsPlan.exerciseId.is_set())
|
||||
dbPlan.exerciseId = ddsPlan.exerciseId.get();
|
||||
dbPlan.dateOfCreation = ddsPlan.date();
|
||||
dbPlan.frequencySetId = ddsPlan.frequencySetId();
|
||||
|
||||
@@ -384,8 +384,8 @@ Core::FunctionReplyObject FrequencyPlanningHandler::validateModifyRequest(const
|
||||
|
||||
const FrequencyPlanning &oldPlan = *found;
|
||||
|
||||
if ((oldPlan.exerciseId().is_set() && oldPlan.exerciseId().get() != request.exerciseId())
|
||||
|| (!oldPlan.exerciseId().is_set() && request.exerciseId() != 0))
|
||||
if ((oldPlan.exerciseId.is_set() && oldPlan.exerciseId.get() != request.exerciseId())
|
||||
|| (!oldPlan.exerciseId.is_set() && request.exerciseId() != 0))
|
||||
return reply.setStr(tr_lts("dds", "Exercise may not be changed"));
|
||||
|
||||
if (request.frequencySetId() != oldPlan.frequencySetId())
|
||||
@@ -417,7 +417,7 @@ Core::FunctionReplyObject FrequencyPlanningHandler::validateRequest(const Core::
|
||||
return reply.setStr(tr_lts("dds", "FrequencyPlanning %1 does not exist")).arg(request.id());
|
||||
|
||||
const FrequencyPlanning &plan = *foundPlan;
|
||||
int exerciseId = plan.exerciseId().is_set() ? plan.exerciseId().get() : 0;
|
||||
int exerciseId = plan.exerciseId.is_set() ? plan.exerciseId.get() : 0;
|
||||
auto foundActivePlan = m_activePlannings.constFind(exerciseId);
|
||||
bool isActive = foundActivePlan != m_activePlannings.constEnd() && foundActivePlan->frequencyPlanningId == plan.id();
|
||||
if (isActive)
|
||||
@@ -542,7 +542,7 @@ Core::FunctionReplyObject FrequencyPlanningHandler::testActivation(const std::ve
|
||||
for (const FrequencyPlanningData &entry : entries)
|
||||
{
|
||||
const CnrConfig &cnrConfig = m_cnrHandler->config(entry.cnrConfigId());
|
||||
bool isGlobal = !cnrConfig.exerciseId().is_set();
|
||||
bool isGlobal = !cnrConfig.exerciseId.is_set();
|
||||
if (!isGlobal)
|
||||
continue;
|
||||
|
||||
@@ -619,7 +619,7 @@ std::vector<int> FrequencyPlanningHandler::takenGlobalCnrConfigs(const std::vect
|
||||
for (const FrequencyPlanningData &entry : plan.data())
|
||||
{
|
||||
const CnrConfig &cnrConfig = m_cnrHandler->config(entry.cnrConfigId());
|
||||
bool isGlobal = !cnrConfig.exerciseId().is_set();
|
||||
bool isGlobal = !cnrConfig.exerciseId.is_set();
|
||||
if (isGlobal)
|
||||
result.push_back(cnrConfig.id());
|
||||
}
|
||||
@@ -774,7 +774,7 @@ void FrequencyPlanningHandler::onCnrConfigRemoved(int cnrConfigId)
|
||||
req.data().erase(found);
|
||||
|
||||
req.date() = fp.date();
|
||||
req.exerciseId() = fp.exerciseId().is_set() ? fp.exerciseId().get() : 0;
|
||||
req.exerciseId() = fp.exerciseId.is_set() ? fp.exerciseId.get() : 0;
|
||||
req.frequencySetId() = fp.frequencySetId();
|
||||
req.id() = fp.id();
|
||||
req.name() = fp.name();
|
||||
|
||||
Reference in new issue
Block a user