diff --git a/smsapp/qml/ContactList.qml b/smsapp/qml/ContactList.qml index 67f5f2293..075886dcd 100644 --- a/smsapp/qml/ContactList.qml +++ b/smsapp/qml/ContactList.qml @@ -35,22 +35,19 @@ Kirigami.ScrollablePage ListView { id: view - spacing: 3 currentIndex: 0 model: PersonsSortFilterProxyModel { requiredProperties: ["phoneNumber"] sortRole: Qt.DisplayRole sortCaseSensitivity: Qt.CaseInsensitive - sourceModel: PersonsModel { - id: people - } + sourceModel: PersonsModel {} } header: TextField { id: filter placeholderText: i18n("Filter...") - Layout.fillWidth: true + width: parent.width onTextChanged: { view.model.filterRegExp = new RegExp(filter.text) view.currentIndex = 0 @@ -68,7 +65,6 @@ Kirigami.ScrollablePage delegate: Kirigami.BasicListItem { - id: mouse hoverEnabled: true readonly property var person: PersonData { diff --git a/smsapp/qml/ConversationDisplay.qml b/smsapp/qml/ConversationDisplay.qml index 1ef2fe356..a91e1a80f 100644 --- a/smsapp/qml/ConversationDisplay.qml +++ b/smsapp/qml/ConversationDisplay.qml @@ -26,12 +26,12 @@ import org.kde.kirigami 2.2 as Kirigami Kirigami.ScrollablePage { id: page - readonly property string phoneNumber: person.contactCustomProperty("phoneNumber") - title: i18n("%1: %2", person.name, phoneNumber) property QtObject person 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 { model: ListModel {