diff --git a/Linphone/core/conference/ConferenceInfoProxy.cpp b/Linphone/core/conference/ConferenceInfoProxy.cpp index 7997b0b81..8dc46c40b 100644 --- a/Linphone/core/conference/ConferenceInfoProxy.cpp +++ b/Linphone/core/conference/ConferenceInfoProxy.cpp @@ -76,10 +76,10 @@ bool ConferenceInfoProxy::filterAcceptsRow(int sourceRow, const QModelIndex &sou if (ciCore) { bool searchTextInSubject = false; bool searchTextInParticipant = false; - if (ciCore->getSubject().toLower().contains(mSearchText.toLower())) searchTextInSubject = true; + if (ciCore->getSubject().contains(mSearchText, Qt::CaseInsensitive)) searchTextInSubject = true; for (auto &contact : ciCore->getParticipants()) { auto infos = contact.toMap(); - if (infos["displayName"].toString().toLower().contains(mSearchText.toLower())) { + if (infos["displayName"].toString().contains(mSearchText, Qt::CaseInsensitive)) { searchTextInParticipant = true; break; } diff --git a/Linphone/core/search/MagicSearchList.cpp b/Linphone/core/search/MagicSearchList.cpp index 8cd7540d3..dd208cb39 100644 --- a/Linphone/core/search/MagicSearchList.cpp +++ b/Linphone/core/search/MagicSearchList.cpp @@ -176,15 +176,15 @@ QVariant MagicSearchList::data(const QModelIndex &index, int role) const { int MagicSearchList::findFriendIndexByAddress(const QString &address) { int i = 0; - qDebug() << "LOOKING FOR ADDRESS" << address; + qDebug() << "[MagicSearchList] LOOKING FOR ADDRESS" << address; for (auto &item : mList) { qDebug() << "item" << item; auto isFriendCore = item.objectCast(); if (!isFriendCore) continue; - qDebug() << "SEARCH IN FRIEND" << isFriendCore->getDisplayName(); + qDebug() << "[MagicSearchList] SEARCH IN FRIEND" << isFriendCore->getDisplayName(); for (auto &friendAddress : isFriendCore->getAllAddresses()) { auto map = friendAddress.toMap(); - qDebug() << "COMPARE" << map["address"].toString(); + // qDebug() << "COMPARE" << map["address"].toString(); if (map["address"].toString() == address) { return i; } diff --git a/Linphone/model/tool/ToolModel.cpp b/Linphone/model/tool/ToolModel.cpp index 1b64e28fb..53c8e61e3 100644 --- a/Linphone/model/tool/ToolModel.cpp +++ b/Linphone/model/tool/ToolModel.cpp @@ -130,7 +130,7 @@ bool ToolModel::createCall(const QString &sipAddress, } for (auto &account : core->getAccountList()) { if (account->getContactAddress() && account->getContactAddress()->weakEqual(address)) { - if (errorMessage) *errorMessage = "The calling address is a connected account."; + if (errorMessage) *errorMessage = tr("The calling address is a connected account."); lDebug() << "[" + QString(gClassName) + "]" + *errorMessage; return false; } diff --git a/Linphone/view/App/CallsWindow.qml b/Linphone/view/App/CallsWindow.qml index cdb986580..ae46ce6e7 100644 --- a/Linphone/view/App/CallsWindow.qml +++ b/Linphone/view/App/CallsWindow.qml @@ -115,8 +115,8 @@ AppWindow { Connections { enabled: !!call target: call && call.core - onRemoteVideoEnabledChanged: console.log("remote video enabled", call.core.remoteVideoEnabled) - onSecurityUpdated: { + function onRemoteVideoEnabledChanged() { console.log("remote video enabled", call.core.remoteVideoEnabled)} + function onSecurityUpdated() { if (call.core.encryption != LinphoneEnums.MediaEncryption.Zrtp || call.core.tokenVerified) { zrtpValidation.close() } @@ -693,9 +693,6 @@ AppWindow { ? modelData.core.conference.core.subject : remoteAddress ? remoteAddress.value : "" Layout.leftMargin: 8 * DefaultStyle.dp - Connections { - target: modelData.core - } } Item { Layout.fillHeight: true @@ -823,7 +820,7 @@ AppWindow { Connections { target: rightPanel - onReturnRequested: participantsStack.pop() + function onReturnRequested(){ participantsStack.pop()} } Component { @@ -866,13 +863,13 @@ AppWindow { } Connections { target: participantsStack - onCurrentItemChanged: { + function onCurrentItemChanged() { if (participantsStack.currentItem == participantList) rightPanel.headerTitleText = qsTr("Participants (%1)").arg(participantList.count) } } Connections { target: rightPanel - onValidateRequested: { + function onValidateRequested() { participantList.model.addAddresses(participantsStack.selectedParticipants) participantsStack.pop() participantsStack.participantAdded() @@ -892,7 +889,7 @@ AppWindow { } Connections { target: participantsStack - onCurrentItemChanged: { + function onCurrentItemChanged() { if (participantsStack.currentItem == addParticipantLayout) { rightPanel.headerTitleText = qsTr("Ajouter des participants") rightPanel.headerSubtitleText = qsTr("%1 participant%2 sélectionné%2").arg(addParticipantLayout.selectedParticipants.length).arg(addParticipantLayout.selectedParticipants.length > 1 ? "s" : "") @@ -1155,11 +1152,11 @@ AppWindow { } Connections { target: rightPanel - onVisibleChanged: if (!visible) waitingRoomIn.settingsButtonChecked = false + function onVisibleChanged(){ if (!visible) waitingRoomIn.settingsButtonChecked = false} } Connections { target:mainWindow - onSetUpConferenceRequested: (conferenceInfo) => { + function onSetUpConferenceRequested(conferenceInfo) { waitingRoomIn.conferenceInfo = conferenceInfo } } @@ -1204,8 +1201,8 @@ AppWindow { Connections { target: mainWindow - onCallStateChanged: bottomButtonsLayout.refreshLayout() - onCallChanged: bottomButtonsLayout.refreshLayout() + function onCallStateChanged(){ bottomButtonsLayout.refreshLayout()} + function onCallChanged(){ bottomButtonsLayout.refreshLayout()} } function setButtonsEnabled(enabled) { for(var i=0; i < children.length; ++i) { @@ -1285,7 +1282,7 @@ AppWindow { } Connections { target: rightPanel - onVisibleChanged: if(!rightPanel.visible) transferCallButton.checked = false + function onVisibleChanged(){ if(!rightPanel.visible) transferCallButton.checked = false} } } CheckableButton { @@ -1404,7 +1401,7 @@ AppWindow { popup.x: width/2 Connections { target: moreOptionsButton.popup - onOpened: { + function onOpened() { moreOptionsButton.popup.y = - moreOptionsButton.popup.height - moreOptionsButton.popup.padding } } diff --git a/Linphone/view/App/Layout/MainLayout.qml b/Linphone/view/App/Layout/MainLayout.qml index 984e9b703..49451f80b 100644 --- a/Linphone/view/App/Layout/MainLayout.qml +++ b/Linphone/view/App/Layout/MainLayout.qml @@ -379,8 +379,8 @@ Item { id: callPage Connections { target: mainItem - onOpenNewCall: callPage.goToNewCall() - onOpenCallHistory: callPage.goToCallHistory() + function onOpenNewCall(){ callPage.goToNewCall()} + function onOpenCallHistory(){ callPage.goToCallHistory()} } onCreateContactRequested: (name, address) => { mainItem.createContact(name, address) @@ -390,10 +390,10 @@ Item { id: contactPage Connections { target: mainItem - onCreateContactRequested: (name, address) => { + function onCreateContactRequested (name, address) { contactPage.createContact(name, address) } - onDisplayContact: (contactAddress) => { + function onDisplayContact (contactAddress) { contactPage.displayContact(contactAddress) } } diff --git a/Linphone/view/App/Layout/Settings/CallSettingsLayout.qml b/Linphone/view/App/Layout/Settings/CallSettingsLayout.qml index fb5141a92..af1ed0c1b 100644 --- a/Linphone/view/App/Layout/Settings/CallSettingsLayout.qml +++ b/Linphone/view/App/Layout/Settings/CallSettingsLayout.qml @@ -233,7 +233,7 @@ GenericSettingsLayout { } Connections { target: SettingsCpp - onMicVolumeChanged: volume => audioTestSlider.value = volume + function onMicVolumeChanged(volume) { audioTestSlider.value = volume} } Component.onCompleted: { SettingsCpp.accessCallSettings() diff --git a/Linphone/view/App/Layout/Settings/DebugSettingsLayout.qml b/Linphone/view/App/Layout/Settings/DebugSettingsLayout.qml index 6be1516c3..5a7e164db 100644 --- a/Linphone/view/App/Layout/Settings/DebugSettingsLayout.qml +++ b/Linphone/view/App/Layout/Settings/DebugSettingsLayout.qml @@ -73,7 +73,7 @@ GenericSettingsLayout { } Connections { target: SettingsCpp - onLogsUploadTerminated: { + function onLogsUploadTerminated() { UtilsCpp.getMainWindow().closeLoadingPopup() if (status) { mainItem.logsUrl = url diff --git a/Linphone/view/App/Main.qml b/Linphone/view/App/Main.qml index 4fb1d5e23..0e22ce4b1 100644 --- a/Linphone/view/App/Main.qml +++ b/Linphone/view/App/Main.qml @@ -104,14 +104,14 @@ AppWindow { onBrowserValidationRequested: mainWindow.showLoadingPopup(qsTr("Veuillez valider le captcha sur la page web"), true) Connections { target: RegisterPageCpp - onNewAccountCreationSucceed: (withEmail, address, sipIdentityAddress) => { + function onNewAccountCreationSucceed(withEmail, address, sipIdentityAddress) { mainWindowStackView.push(checkingPage, {"registerWithEmail": withEmail, "address": address, "sipIdentityAddress": sipIdentityAddress}) } - onRegisterNewAccountFailed: (errorMessage) => { + function onRegisterNewAccountFailed(errorMessage) { mainWindow.showInformationPopup(qsTr("Erreur lors de la création"), errorMessage, false) mainWindow.closeLoadingPopup() } - onTokenConversionSucceed: mainWindow.closeLoadingPopup() + function onTokenConversionSucceed(){ mainWindow.closeLoadingPopup()} } } } @@ -124,11 +124,11 @@ AppWindow { } Connections { target: RegisterPageCpp - onLinkingNewAccountWithCodeSucceed: { + function onLinkingNewAccountWithCodeSucceed() { mainWindowStackView.replace(loginPage) mainWindow.showInformationPopup(qsTr("Compte créé"), qsTr("Le compte a été créé avec succès. Vous pouvez maintenant vous connecter"), true) } - onLinkingNewAccountWithCodeFailed: (errorMessage) => { + function onLinkingNewAccountWithCodeFailed(errorMessage) { if (errorMessage.length === 0) errorMessage = qsTr("Erreur dans le code de validation") mainWindow.showInformationPopup(qsTr("Erreur"), errorMessage, false) } diff --git a/Linphone/view/Item/Contact/ContactEdition.qml b/Linphone/view/Item/Contact/ContactEdition.qml index 353608090..4d026bde5 100644 --- a/Linphone/view/Item/Contact/ContactEdition.qml +++ b/Linphone/view/Item/Contact/ContactEdition.qml @@ -14,7 +14,7 @@ RightPanelLayout { property FriendGui contact Connections { target: contact.core - onIsSavedChanged: { + function onIsSavedChanged() { if (contact.core.isSaved) { var mainWin = UtilsCpp.getMainWindow() UtilsCpp.smartShowWindow(mainWin) @@ -305,12 +305,9 @@ RightPanelLayout { topPadding: 11 * DefaultStyle.dp bottomPadding: 11 * DefaultStyle.dp onClicked: { - if (givenNameEdit.text.length === 0) { - givenName.errorMessage = qsTr("Veuillez saisir un prénom") - return - } - if (addressesList.count === 0) { - addressesErrorText.text = qsTr("Veuillez saisir une adresse ou un numéro de téléphone") + if (givenNameEdit.text.length === 0 || addressesList.count === 0) { + if (givenNameEdit.text.length === 0) givenName.errorMessage = qsTr("Veuillez saisir un prénom") + if (addressesList.count === 0) addressesErrorText.text = qsTr("Veuillez saisir une adresse ou un numéro de téléphone") return } mainItem.contact.core.save() diff --git a/Linphone/view/Item/Contact/ContactsList.qml b/Linphone/view/Item/Contact/ContactsList.qml index 1d533a20b..87a0e3113 100644 --- a/Linphone/view/Item/Contact/ContactsList.qml +++ b/Linphone/view/Item/Contact/ContactsList.qml @@ -51,7 +51,7 @@ ListView { console.log("select", address) var index = magicSearchProxy.findFriendIndexByAddress(address) console.log("index in selection", index) - if (index == -1) { + if (index != -1) { mainItem.currentIndex = index } } @@ -102,7 +102,7 @@ ListView { Connections { enabled: modelData.core target: modelData.core - onStarredChanged: mainItem.contactStarredChanged() + function onStarredChanged() { mainItem.contactStarredChanged()} } Text { id: initial @@ -151,7 +151,7 @@ ListView { Connections { target: mainItem // onParticipantsChanged: isSelectedCheck.visible = mainItem.confInfoGui.core.getParticipantIndex(modelData.core.defaultAddress) != -1 - onSelectedContactCountChanged: isSelectedCheck.visible = (mainItem.selectedContacts.indexOf(modelData.core.defaultAddress) != -1) + function onSelectedContactCountChanged(){ isSelectedCheck.visible = (mainItem.selectedContacts.indexOf(modelData.core.defaultAddress) != -1)} } } } diff --git a/Linphone/view/Item/ErrorText.qml b/Linphone/view/Item/ErrorText.qml index b32cf99b6..da8f0064b 100644 --- a/Linphone/view/Item/ErrorText.qml +++ b/Linphone/view/Item/ErrorText.qml @@ -42,7 +42,7 @@ Text { Connections { target: mainItem - onTextChanged: { + function onTextChanged() { if (mainItem.text.length > 0) { mainItem.state = "Visible" } else { diff --git a/Linphone/view/Item/Form/LoginForm.qml b/Linphone/view/Item/Form/LoginForm.qml index fbffc47c0..ab6d641b4 100644 --- a/Linphone/view/Item/Form/LoginForm.qml +++ b/Linphone/view/Item/Form/LoginForm.qml @@ -64,10 +64,10 @@ ColumnLayout { anchors.top: password.bottom Connections { target: LoginPageCpp - onErrorMessageChanged: { + function onErrorMessageChanged() { errorText.text = LoginPageCpp.errorMessage } - onRegistrationStateChanged: { + function onRegistrationStateChanged() { if (LoginPageCpp.registrationState === LinphoneEnums.RegistrationState.Ok) { mainItem.connectionSucceed() } @@ -107,13 +107,13 @@ ColumnLayout { } Connections { target: LoginPageCpp - onRegistrationStateChanged: { + function onRegistrationStateChanged() { if (LoginPageCpp.registrationState != LinphoneEnums.RegistrationState.Progress) { connectionButton.enabled = true connectionButtonContent.currentIndex = 0 } } - onErrorMessageChanged: { + function onErrorMessageChanged() { connectionButton.enabled = true connectionButtonContent.currentIndex = 0 } diff --git a/Linphone/view/Item/Meeting/MeetingSetUp.qml b/Linphone/view/Item/Meeting/MeetingSetUp.qml index 38610619a..fd4ba9c46 100644 --- a/Linphone/view/Item/Meeting/MeetingSetUp.qml +++ b/Linphone/view/Item/Meeting/MeetingSetUp.qml @@ -17,7 +17,7 @@ ColumnLayout { Connections { target: mainItem.conferenceInfoGui.core - onSchedulerStateChanged: { + function onSchedulerStateChanged() { if (mainItem.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.Ready) { mainItem.saveSucceed(isCreation) } diff --git a/Linphone/view/Item/SearchBar.qml b/Linphone/view/Item/SearchBar.qml index c927f3555..03e53fd60 100644 --- a/Linphone/view/Item/SearchBar.qml +++ b/Linphone/view/Item/SearchBar.qml @@ -27,12 +27,12 @@ Rectangle { Connections { enabled: numericPad != undefined target: numericPad ? numericPad : null - onAboutToHide: { mainItem.numericPadButton.checked = false } - onAboutToShow: { mainItem.numericPadButton.checked = true } - onButtonPressed: (text) => { + function onAboutToHide() { mainItem.numericPadButton.checked = false } + function onAboutToShow() { mainItem.numericPadButton.checked = true } + function onButtonPressed(text) { textField.text += text } - onWipe: textField.text = textField.text.slice(0, -1) + function onWipe(){ textField.text = textField.text.slice(0, -1)} } diff --git a/Linphone/view/Item/ZrtpTokenAuthenticationDialog.qml b/Linphone/view/Item/ZrtpTokenAuthenticationDialog.qml index cc37302d0..95a0dd531 100644 --- a/Linphone/view/Item/ZrtpTokenAuthenticationDialog.qml +++ b/Linphone/view/Item/ZrtpTokenAuthenticationDialog.qml @@ -27,14 +27,14 @@ Dialog { enabled: call != undefined && call != null target: call && call.core onStatusChanged: if (status === CallModel.CallStatusEnded) close() - onSecurityUpdated: { + function onSecurityUpdated() { if (mainItem.isTokenVerified) { close() // mainItem.securityError = true // } else close() } } - onTokenVerified: { + function onTokenVerified() { if (!mainItem.isTokenVerified) { mainItem.securityError = true } else close() diff --git a/Linphone/view/Page/Login/RegisterPage.qml b/Linphone/view/Page/Login/RegisterPage.qml index 9785cdb8f..5411c3aae 100644 --- a/Linphone/view/Page/Login/RegisterPage.qml +++ b/Linphone/view/Page/Login/RegisterPage.qml @@ -15,7 +15,7 @@ LoginLayout { Connections { target: RegisterPageCpp - onErrorInField: (field, errorMessage) => { + function onErrorInField(field, errorMessage) { if (field == "username") usernameItem.errorMessage = errorMessage else if (field == "password") pwdItem.errorMessage = errorMessage else if (field == "phone") phoneNumberInput.errorMessage = errorMessage diff --git a/Linphone/view/Page/Login/SIPLoginPage.qml b/Linphone/view/Page/Login/SIPLoginPage.qml index f4dbffb23..7d56b4c76 100644 --- a/Linphone/view/Page/Login/SIPLoginPage.qml +++ b/Linphone/view/Page/Login/SIPLoginPage.qml @@ -190,7 +190,7 @@ LoginLayout { id: errorText Connections { target: LoginPageCpp - onRegistrationStateChanged: { + function onRegistrationStateChanged() { if (LoginPageCpp.registrationState === LinphoneEnums.RegistrationState.Failed) { errorText.text = qsTr("Connection has failed. Please verify your credentials") } else if (LoginPageCpp.registrationState === LinphoneEnums.RegistrationState.Ok) { diff --git a/Linphone/view/Page/Main/CallPage.qml b/Linphone/view/Page/Main/CallPage.qml index 23c897043..a924c2649 100644 --- a/Linphone/view/Page/Main/CallPage.qml +++ b/Linphone/view/Page/Main/CallPage.qml @@ -29,7 +29,7 @@ AbstractMainPage { Connections { enabled: confInfoGui target: confInfoGui ? confInfoGui.core : null - onConferenceSchedulerStateChanged: { + function onConferenceSchedulerStateChanged() { if (confInfoGui.core.schedulerState === LinphoneEnums.ConferenceSchedulerState.Ready) { listStackView.pop() } @@ -215,7 +215,7 @@ AbstractMainPage { Connections { target: deleteHistoryPopup - onAccepted: { + function onAccepted() { historyListView.model.removeAllEntries() } } @@ -358,7 +358,7 @@ AbstractMainPage { Connections { target: mainItem - onListViewUpdated: { + function onListViewUpdated() { historyListView.model.updateView() } } @@ -426,7 +426,7 @@ AbstractMainPage { } Connections { target: mainItem - onCreateCallFromSearchBarRequested: UtilsCpp.createCall(callContactsList.searchBar.text) + function onCreateCallFromSearchBarRequested(){ UtilsCpp.createCall(callContactsList.searchBar.text)} } } } @@ -497,7 +497,7 @@ AbstractMainPage { nameGroupCall: true Connections { target: mainItem - onStartGroupCallRequested: { + function onStartGroupCallRequested() { if (groupName.length === 0) { UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("Un nom doit être donné à l'appel de groupe"), false) } else if(!mainItem.isRegistered) { @@ -591,7 +591,7 @@ AbstractMainPage { } Connections { target: deleteForUserPopup - onAccepted: { + function onAccepted() { detailListView.model.removeEntriesWithFilter() mainItem.listViewUpdated() } diff --git a/Linphone/view/Page/Main/ContactPage.qml b/Linphone/view/Page/Main/ContactPage.qml index 891f1b64e..efdcd3d54 100644 --- a/Linphone/view/Page/Main/ContactPage.qml +++ b/Linphone/view/Page/Main/ContactPage.qml @@ -320,7 +320,7 @@ AbstractMainPage { model: allFriends Connections { target: allFriends - onFriendCreated: (index) => { + function onFriendCreated(index) { contactList.currentIndex = index } } diff --git a/Linphone/view/Page/Main/MeetingPage.qml b/Linphone/view/Page/Main/MeetingPage.qml index d435fadb1..925ba2648 100644 --- a/Linphone/view/Page/Main/MeetingPage.qml +++ b/Linphone/view/Page/Main/MeetingPage.qml @@ -283,7 +283,7 @@ AbstractMainPage { Layout.rightMargin: 35 * DefaultStyle.dp Connections { target: meetingSetup.conferenceInfoGui ? meetingSetup.conferenceInfoGui.core : null - onConferenceSchedulerStateChanged: { + function onConferenceSchedulerStateChanged() { var mainWin = UtilsCpp.getMainWindow() if (meetingSetup.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.AllocationPending || meetingSetup.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.Updating) { @@ -307,7 +307,7 @@ AbstractMainPage { } Connections { target: mainItem - onAddParticipantsValidated: (selectedParticipants) => { + function onAddParticipantsValidated(selectedParticipants) { meetingSetup.conferenceInfoGui.core.resetParticipants(selectedParticipants) leftPanelStackView.pop() } @@ -384,14 +384,14 @@ AbstractMainPage { } Connections { target: mainItem - onAddParticipantsValidated: (selectedParticipants) => { + function onAddParticipantsValidated(selectedParticipants) { conferenceEdit.conferenceInfoGui.core.resetParticipants(selectedParticipants) overridenRightPanelStackView.pop() } } Connections { target: conferenceEdit.conferenceInfoGui ? conferenceEdit.conferenceInfoGui.core : null - onConferenceSchedulerStateChanged: { + function onConferenceSchedulerStateChanged() { var mainWin = UtilsCpp.getMainWindow() if (conferenceEdit.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.Error) { UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("L'édition de la conférence a échoué"), false) @@ -535,10 +535,10 @@ AbstractMainPage { } Connections { target: cancelAndDeleteConfDialog - onCancelRequested: { + function onCancelRequested() { mainItem.selectedConference.core.lCancelConferenceInfo() } - onAccepted: { + function onAccepted() { mainItem.selectedConference.core.lDeleteConferenceInfo() } } diff --git a/Linphone/view/Prototype/CallPrototype.qml b/Linphone/view/Prototype/CallPrototype.qml index c2e38d5c4..84d4e121e 100644 --- a/Linphone/view/Prototype/CallPrototype.qml +++ b/Linphone/view/Prototype/CallPrototype.qml @@ -27,7 +27,7 @@ Window { Component.onDestruction: gc() Connections{ target: call && call.core || null - onLastErrorMessageChanged: if(mainItem.call) errorMessageText.text=mainItem.call.core.lastErrorMessage + function onLastErrorMessageChanged() { if(mainItem.call) errorMessageText.text=mainItem.call.core.lastErrorMessage} } RowLayout{ anchors.fill: parent