summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-17 21:22:07 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-17 21:22:07 +0800
commit74f22dd0200dce263522c68d57901547d61350de (patch)
treed6a0348cc3d45ee2c56c2f4b72d70bb1978572a3
parent3ac6ebbc5243f2b0ddddcfc58ba81eb686fb5aa2 (diff)
Simplify userNew use code
-rw-r--r--Login.qml27
-rw-r--r--controller.cxx15
-rw-r--r--pages/CreateProfile.qml27
m---------qrtclient0
4 files changed, 7 insertions, 62 deletions
diff --git a/Login.qml b/Login.qml
index 1c46157..6234d83 100644
--- a/Login.qml
+++ b/Login.qml
@@ -2,31 +2,8 @@ import QtQuick 2.12
LoginForm {
signal logIn(string name, string password)
- signal signUp(
- string name
- , string emailAddress
- , string realName
- , string nickName
- , string gecos
- , int lang
- , int timeZone
- , string contactInfo
- , bool enabled
- , bool privileged
- , string password
- , string comments
- , string signature
- , string organization
- , string address1
- , string address2
- , string city
- , string state
- , string zip
- , string country
- , string homePhone
- , string workPhone
- , string mobilePhone
- , string pagerPhone)
+ signal signUp(string name, string password, string emailAddress
+ , string realName)
signal search(string name)
function pushProfile() {
stackView.push("qrc:/pages/Profile.qml")
diff --git a/controller.cxx b/controller.cxx
index 96a1d8f..8e947cf 100644
--- a/controller.cxx
+++ b/controller.cxx
@@ -17,18 +17,9 @@ Controller::Controller(QObject* parent) : QObject{parent}
auto loginView = appWindow->findChild<QObject*>("login");
connect(loginView, SIGNAL(logIn(QString, QString))
, client, SLOT(logIn(QString, QString)));
- connect(loginView, SIGNAL(signUp(QString, QString, QString, QString
- , QString, int, int
- , QString, bool, bool, QString, QString
- , QString, QString, QString, QString
- , QString, QString, QString, QString
- , QString, QString, QString, QString))
- , client, SLOT(userNew(QString, QString, QString, QString
- , QString, int, int
- , QString, bool, bool, QString, QString
- , QString, QString, QString, QString
- , QString, QString, QString, QString
- , QString, QString, QString, QString)));
+ connect(loginView, SIGNAL(signUp(QString, QString, QString, QString))
+ , client, SLOT(userNew(QString, QString, QString
+ , QString)));
connect(client, SIGNAL(logged(rt_user*)), loginView, SLOT(pushProfile()));
connect(loginView, SIGNAL(search(QString)), client, SLOT(search(QString)));
diff --git a/pages/CreateProfile.qml b/pages/CreateProfile.qml
index b0b03a1..a324149 100644
--- a/pages/CreateProfile.qml
+++ b/pages/CreateProfile.qml
@@ -12,30 +12,7 @@ CreateProfileForm {
startUsingKelakon.onClicked: {
User.name = userNameLabel.text
User.realName = enterFullName.text
- login.signUp(
- User.name
- , User.emailAddress
- , User.realName
- , ""
- , ""
- , 0
- , 0
- , ""
- , true
- , false
- , User.password
- , ""
- , ""
- , ""
- , ""
- , ""
- , ""
- , ""
- , ""
- , ""
- , ""
- , ""
- , ""
- , "")
+ login.signUp(User.name, User.password, User.emailAddress
+ , User.realName)
}
}
diff --git a/qrtclient b/qrtclient
-Subproject 54ea1894dcfaed86478bab8d00385ae7b5cb2f0
+Subproject 97ea7f4d59f454a7a9b44a44b2513a4a3138c57