diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-13 13:17:33 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-13 13:17:33 +0800 |
commit | 76e22f15b9f7eb9227d6ba32198ea1f5464664e5 (patch) | |
tree | dc01ee71aff3542ee2b2a608fa32e763c75c8278 /interchange/member.hxx | |
parent | 3bb1e0c14ac7adccadfb71aba33cf2fb54e91850 (diff) |
Member data init from C struct is at constructor
with a copy, and the need to keep a pointer to the C struct is no
more.
Diffstat (limited to 'interchange/member.hxx')
-rw-r--r-- | interchange/member.hxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/interchange/member.hxx b/interchange/member.hxx index 897b086..3f00dba 100644 --- a/interchange/member.hxx +++ b/interchange/member.hxx @@ -33,6 +33,8 @@ namespace QInterchange { public: explicit Member(QObject* parent = nullptr); + explicit Member(struct interchange_member member, + QObject* parent = nullptr); ~Member() {} QString const& userName() const { return m_userName; } @@ -54,7 +56,6 @@ namespace QInterchange { QString const& country() const { return m_country; } QString const& phoneDay() const { return m_phoneDay; } QString const& email() const { return m_email; } - interchange_member* data() { return m_data; } void setUserName(QString const& userName); void setUserNick(QString const& userNick); @@ -75,7 +76,6 @@ namespace QInterchange { void setCountry(QString const& country); void setPhoneDay(QString const& phoneDay); void setEmail(QString const& email); - void setData(interchange_member* data); public slots: void newAccount(QString const& username, @@ -151,9 +151,7 @@ namespace QInterchange { QString m_country; QString m_phoneDay; QString m_email; - interchange_member* m_data; }; - } #endif |