From 66d5d8685f7dcd45b2e9581315c101e69646cd6f 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