summaryrefslogtreecommitdiff
path: root/src/model/Competitor.cpp
diff options
context:
space:
mode:
authorSteru <jerrydream111@gmail.com>2024-08-15 23:27:54 +0200
committerOrangerot <purple@orangerot.dev>2024-08-26 11:19:38 +0200
commitb6c86f02ff7ecb74cc96af61d8216b232bcecb3e (patch)
tree26def991cecebcaf8704a5194ae84d4bfe137951 /src/model/Competitor.cpp
parentdb2d0c21c48698d336ac6e60c42cc2533648b51d (diff)
Made Competitor a QObject and tidied up some code.
Diffstat (limited to 'src/model/Competitor.cpp')
-rw-r--r--src/model/Competitor.cpp8
1 files changed, 4 insertions, 4 deletions
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;
}