From ff81ff0d048f2f1fed503b5e1685d2b1e3fd9c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Thu, 12 Sep 2019 22:32:19 +0800 Subject: Once logged in, e-mail address and real name are set on view --- pages/CreateProfile.qml | 16 +++++----------- pages/CreateProfileForm.ui.qml | 3 ++- user.cxx | 2 ++ 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/pages/CreateProfile.qml b/pages/CreateProfile.qml index 048c861..e03442d 100644 --- a/pages/CreateProfile.qml +++ b/pages/CreateProfile.qml @@ -1,17 +1,11 @@ import QtQuick 2.12 +import KelakonUser 0.1 CreateProfileForm { width: stackView.width height: stackView.height - - backButton { - onClicked: { - stackView.pop() - } - } - skipButton { - onClicked: { - stackView.push("qrc:/pages/Home.qml") - } - } + backButton.onClicked: stackView.pop() + skipButton.onClicked: stackView.push("qrc:/pages/Home.qml") + emailAddressLabel.text: User.emailAddress + enterFullName.text: User.realName } diff --git a/pages/CreateProfileForm.ui.qml b/pages/CreateProfileForm.ui.qml index 8c03251..2da2083 100644 --- a/pages/CreateProfileForm.ui.qml +++ b/pages/CreateProfileForm.ui.qml @@ -7,9 +7,10 @@ Rectangle { id: rectangle color: "#fff" - property alias enterFullName: enterFullName property alias backButton: backButton property alias skipButton: skipButton + property alias emailAddressLabel: emailAddressLabel + property alias enterFullName: enterFullName ToolBar { id: toolbar diff --git a/user.cxx b/user.cxx index 822de61..84ef4f1 100644 --- a/user.cxx +++ b/user.cxx @@ -174,7 +174,9 @@ void User::update(rt_user* user) if (user) { m_id = user->id; m_emailAddress = user->emailaddress; + emit emailAddressChanged(); m_realName = user->realname; + emit realNameChanged(); m_nickName = user->nickname; m_gecos = user->gecos; m_organization = user->organization; -- cgit v1.2.3