summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interchange/member.hxx3
-rw-r--r--member.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/interchange/member.hxx b/interchange/member.hxx
index 4031f7e..b40dc6d 100644
--- a/interchange/member.hxx
+++ b/interchange/member.hxx
@@ -32,7 +32,8 @@ namespace QInterchange {
Q_PROPERTY(QString email READ email WRITE setEmail NOTIFY emailChanged)
public:
- explicit Member(QObject* parent = nullptr);
+ explicit Member(interchange_member* data = nullptr,
+ QObject* parent = nullptr);
~Member() {}
QString const& userName() const { return m_userName; }
diff --git a/member.cxx b/member.cxx
index aa0c66d..ff5ee26 100644
--- a/member.cxx
+++ b/member.cxx
@@ -7,7 +7,7 @@ namespace QInterchange {
static Member* member;
static char *unCopy, *pwCopy, *vCopy, *fpCopy;
- Member::Member(QObject* parent) :
+ Member::Member(interchange_member* data, QObject* parent) :
QObject{parent},
m_userName{""},
m_userNick{""},
@@ -30,6 +30,7 @@ namespace QInterchange {
m_email{""},
m_data{nullptr}
{
+ if (data) setData(data);
member = this;
}