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/Competitor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/model/Competitor.cpp') diff --git a/src/model/Competitor.cpp b/src/model/Competitor.cpp index d39d134..080dd4d 100644 --- a/src/model/Competitor.cpp +++ b/src/model/Competitor.cpp @@ -4,12 +4,12 @@ bool Competitor::setCompetitor(const QJsonObject &competitor) { if (!competitor.contains("code") || !competitor.contains("name") - || !competitor.contains("noc")) { + || !competitor.contains("m_noc")) { throw invalid_argument("Not a competitor object."); } - this->code = competitor["code"].toInt(); - this->name = competitor["name"].toString(); - this->noc = competitor["noc"].toString(); + this->m_code = competitor["code"].toInt(); + this->m_name = competitor["name"].toString(); + this->m_noc = competitor["m_noc"].toString(); return true; } -- cgit v1.2.3