Skip to content

Commit

Permalink
Remove Time element from IOF XML 3.0 export if SplitTime is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
paukert committed Aug 7, 2022
1 parent 3936ebf commit 259e6bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,10 @@ QString RelaysPlugin::resultsIofXml30()
}
QVariantList split{QStringLiteral("SplitTime")};
append_list(split, QVariantList{"ControlCode", cd.code()});
append_list(split, QVariantList{"Time", time / 1000});
if(time == 0)
split.insert(1, QVariantMap{ {QStringLiteral("status"), QStringLiteral("Missing")} });
else
append_list(split, QVariantList{"Time", time / 1000});
append_list(person_result, split);
}
}
Expand Down
3 changes: 2 additions & 1 deletion quickevent/app/quickevent/plugins/Runs/src/runsplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -927,10 +927,11 @@ bool RunsPlugin::exportResultsIofXml30Stage(int stage_id, const QString &file_na
QVariantList split_time{
QStringLiteral("SplitTime"),
QVariantList{QStringLiteral("ControlCode"), cd.code() },
QVariantList{QStringLiteral("Time"), stp_time / 1000 },
};
if(stp_time == 0)
split_time.insert(1, QVariantMap{ {QStringLiteral("status"), QStringLiteral("Missing")} });
else
split_time.insert(split_time.count(), QVariantList{QStringLiteral("Time"), stp_time / 1000});
result.insert(result.count(), split_time);
ix += 4;
}
Expand Down

0 comments on commit 259e6bf

Please sign in to comment.