summaryrefslogtreecommitdiff
path: root/src/model/Competitor.h
diff options
context:
space:
mode:
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;