summaryrefslogtreecommitdiff
path: root/src/model/Competitor.h
diff options
context:
space:
mode:
authorSteru <jerrydream111@gmail.com>2024-08-16 15:39:05 +0200
committerSteru <jerrydream111@gmail.com>2024-08-16 15:59:22 +0200
commit3918de89ce74bea2f18f814edc9accad4af9d818 (patch)
treeb86013c6be31e0f2caec6e00dd9cc82cfa194ad1 /src/model/Competitor.h
parent66d5d8685f7dcd45b2e9581315c101e69646cd6f (diff)
Fixed constructors.
Diffstat (limited to 'src/model/Competitor.h')
-rw-r--r--src/model/Competitor.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/model/Competitor.h b/src/model/Competitor.h
index 79552a5..1913325 100644
--- a/src/model/Competitor.h
+++ b/src/model/Competitor.h
@@ -5,6 +5,7 @@
#include <QMap>
#include <QJsonObject>
#include <QObject>
+#include <qqml.h>
using namespace std;
@@ -18,9 +19,7 @@ class Competitor : public QObject {
Q_PROPERTY(QString noc READ noc NOTIFY nNoc)
public:
- Competitor() : m_code(0), m_name(""), m_noc("") {}
- Competitor(const Competitor &competitor) : m_code(competitor.m_code), m_name(competitor.m_name), m_noc(competitor.m_noc) {}
- Competitor(const QJsonObject &competitor) { setCompetitor(competitor); }
+ explicit Competitor(QObject *parent) : QObject(parent) {}
int getCode() { return this->m_code; }
QString getName() { return this->m_name; }
@@ -31,6 +30,7 @@ public:
void setNOC(QString noc) { this->m_noc = noc; }
bool setCompetitor(const QJsonObject &competitor);
+ bool setCompetitor(const Competitor &competitor);
static bool compareName(const Competitor &left, const Competitor &right) {
return left.m_name.compare(right.m_name) < 0;