Use KPeople API that exists

This commit is contained in:
Aleix Pol 2018-03-25 22:21:39 +02:00
parent c863feef58
commit bee6c4a8be

View file

@ -26,7 +26,8 @@ import org.kde.kirigami 2.4 as Kirigami
Kirigami.ScrollablePage Kirigami.ScrollablePage
{ {
id: page id: page
title: i18n("%1: %2", person.name, person.phone) readonly property string phoneNumber: person.contactCustomProperty("phoneNumber")
title: i18n("%1: %2", person.name, phoneNumber)
property QtObject person property QtObject person
property QtObject device property QtObject device
@ -57,8 +58,8 @@ Kirigami.ScrollablePage
Button { Button {
text: "Send" text: "Send"
onClicked: { onClicked: {
console.log("sending sms", page.person.phone) console.log("sending sms", page.phoneNumber)
page.telephony.sendSms(page.person.phone, message.text) page.telephony.sendSms(page.phoneNumber, message.text)
} }
} }
} }