From b869b8983656b12f9dee59439acfb6b3db647b72 Mon Sep 17 00:00:00 2001 From: Steru Date: Thu, 15 Aug 2024 23:27:54 +0200 Subject: Made Competitor a QObject and tidied up some code. --- src/model/CompetitorWithResults.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/model/CompetitorWithResults.cpp') 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; } -- cgit v1.2.3