diff options
author | Steru <jerrydream111@gmail.com> | 2024-08-16 15:39:05 +0200 |
---|---|---|
committer | Orangerot <purple@orangerot.dev> | 2024-08-26 11:19:38 +0200 |
commit | d40fcd9017ccb441c1859606c6c2583c13ac5866 (patch) | |
tree | 206ec6ebcc48d009176407ea5438eed8dbad6511 /src/model/Competitor.h | |
parent | b6c86f02ff7ecb74cc96af61d8216b232bcecb3e (diff) |
Fixed constructors.
Diffstat (limited to 'src/model/Competitor.h')
-rw-r--r-- | src/model/Competitor.h | 6 |
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; |