Update meeting title while typing.
Take account sip address on losing focus when saving contact.
This commit is contained in:
parent
4181d19631
commit
ae82cd0ea6
2 changed files with 20 additions and 11 deletions
|
|
@ -70,8 +70,12 @@ MainRightPanel {
|
|||
contact: mainItem.contact
|
||||
button.text: mainItem.saveButtonText
|
||||
|
||||
button.onClicked: {
|
||||
if (contact.core.givenName.length === 0) {
|
||||
// Let some time to GUI to set fields on losing focus.
|
||||
Timer{
|
||||
id: saveDelay
|
||||
interval: 200
|
||||
onTriggered:{
|
||||
if (mainItem.contact.core.givenName.length === 0) {
|
||||
givenName.errorMessage = qsTr("Veuillez saisir un prénom")
|
||||
return
|
||||
} else if (addressesList.count === 0 && phoneNumberList.count === 0) {
|
||||
|
|
@ -80,6 +84,11 @@ MainRightPanel {
|
|||
}
|
||||
mainItem.contact.core.save()
|
||||
}
|
||||
}
|
||||
button.onClicked: {
|
||||
button.forceActiveFocus()
|
||||
saveDelay.restart()
|
||||
}
|
||||
bannerContent: [
|
||||
IconLabelButton {
|
||||
id: addPictureButton
|
||||
|
|
@ -397,7 +406,7 @@ MainRightPanel {
|
|||
Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
elide: Text.ElideRight
|
||||
onTextChanged: if(text.length > 0) editionLayout.ensureVisible(this)
|
||||
onTextChanged: if(addressesErrorText.text.length > 0) editionLayout.ensureVisible(this)
|
||||
}
|
||||
Item{Layout.fillHeight: true}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ AbstractMainPage {
|
|||
KeyNavigation.down: conferenceEdit
|
||||
KeyNavigation.up: conferenceEdit
|
||||
onActiveFocusChanged: if(activeFocus==true) selectAll()
|
||||
onEditingFinished: mainItem.selectedConference.core.subject = text
|
||||
onTextEdited: mainItem.selectedConference.core.subject = text
|
||||
Component.onCompleted: {
|
||||
text = mainItem.selectedConference.core.subject
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue