diff options
author | Steru <jerrydream111@gmail.com> | 2024-08-15 23:27:54 +0200 |
---|---|---|
committer | Steru <jerrydream111@gmail.com> | 2024-08-16 23:53:31 +0200 |
commit | b869b8983656b12f9dee59439acfb6b3db647b72 (patch) | |
tree | 9bbb90ed4bfd6c9937beb3f5871ce2a6fbaa7059 /src/model/CompetitorWithResults.cpp | |
parent | 4f12d941f949bb8b8c1d043ac34772c5c80f1b89 (diff) |
Made Competitor a QObject and tidied up some code.
Diffstat (limited to 'src/model/CompetitorWithResults.cpp')
-rw-r--r-- | src/model/CompetitorWithResults.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/model/CompetitorWithResults.cpp b/src/model/CompetitorWithResults.cpp index 1601a4a..9dbd615 100644 --- a/src/model/CompetitorWithResults.cpp +++ b/src/model/CompetitorWithResults.cpp @@ -8,13 +8,13 @@ * @return True, if successful. */ bool CompetitorWithResults::setResults(const QJsonObject &results) { - if (!results.contains("mark") - || !results.contains("medalType")) { + if (!results.contains("m_mark") + || !results.contains("m_medalType")) { throw invalid_argument("Results object of competitor is incomplete."); } - this->mark = results["mark"].toString(); - this->medalType = results["medalType"].toString(); + this->m_mark = results["m_mark"].toString(); + this->m_medalType = results["m_medalType"].toString(); return true; } |