summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-02-10 21:24:23 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-02-10 21:24:23 +0800
commitbe6b49c531478b06e8f88ad8609ed2e29fa27f47 (patch)
treef24c95bc64e549576956d1cad2e145831f0a8744
parentfa11214a4e9181cff9f29e5774e09004ac5acfea (diff)
Account creation signal & emission
-rw-r--r--interchange/member.hxx2
-rw-r--r--member.cxx6
2 files changed, 8 insertions, 0 deletions
diff --git a/interchange/member.hxx b/interchange/member.hxx
index 4e471df..18891ca 100644
--- a/interchange/member.hxx
+++ b/interchange/member.hxx
@@ -96,6 +96,7 @@ namespace QInterchange {
void logOut();
signals:
+ void created(QString const& response);
void loggedIn(QString const& response);
void userNameChanged();
void userNickChanged();
@@ -118,6 +119,7 @@ namespace QInterchange {
void emailChanged();
protected:
+ void emitCreation(QString const& response);
void emitLogin(QString const& response);
private:
diff --git a/member.cxx b/member.cxx
index 610d7f0..86027d3 100644
--- a/member.cxx
+++ b/member.cxx
@@ -55,6 +55,7 @@ namespace QInterchange {
free(pwCopy);
free(vCopy);
free(fpCopy);
+ member->emitCreation(QString{response->data});
interchange_free_response(response);
}, nullptr);
}
@@ -361,6 +362,11 @@ namespace QInterchange {
setData(nullptr);
}
+ void Member::emitCreation(QString const& response)
+ {
+ emit created(response);
+ }
+
void Member::emitLogin(QString const& response)
{
emit loggedIn(response);