SMS App: remove certain cruft and warnings

This commit is contained in:
Aleix Pol 2018-04-08 02:34:26 +02:00
parent 11071b4894
commit f20cb63e53
2 changed files with 5 additions and 9 deletions

View file

@ -35,22 +35,19 @@ Kirigami.ScrollablePage
ListView { ListView {
id: view id: view
spacing: 3
currentIndex: 0 currentIndex: 0
model: PersonsSortFilterProxyModel { model: PersonsSortFilterProxyModel {
requiredProperties: ["phoneNumber"] requiredProperties: ["phoneNumber"]
sortRole: Qt.DisplayRole sortRole: Qt.DisplayRole
sortCaseSensitivity: Qt.CaseInsensitive sortCaseSensitivity: Qt.CaseInsensitive
sourceModel: PersonsModel { sourceModel: PersonsModel {}
id: people
}
} }
header: TextField { header: TextField {
id: filter id: filter
placeholderText: i18n("Filter...") placeholderText: i18n("Filter...")
Layout.fillWidth: true width: parent.width
onTextChanged: { onTextChanged: {
view.model.filterRegExp = new RegExp(filter.text) view.model.filterRegExp = new RegExp(filter.text)
view.currentIndex = 0 view.currentIndex = 0
@ -68,7 +65,6 @@ Kirigami.ScrollablePage
delegate: Kirigami.BasicListItem delegate: Kirigami.BasicListItem
{ {
id: mouse
hoverEnabled: true hoverEnabled: true
readonly property var person: PersonData { readonly property var person: PersonData {

View file

@ -26,12 +26,12 @@ import org.kde.kirigami 2.2 as Kirigami
Kirigami.ScrollablePage Kirigami.ScrollablePage
{ {
id: page id: page
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
readonly property QtObject telephony: TelephonyDbusInterfaceFactory.create(device.id()) readonly property string phoneNumber: person.contactCustomProperty("phoneNumber")
readonly property QtObject telephony: device ? TelephonyDbusInterfaceFactory.create(device.id()) : null
title: i18n("%1: %2", person.name, phoneNumber)
ListView { ListView {
model: ListModel { model: ListModel {