diff --git a/Linphone/core/conference/ConferenceInfoCore.cpp b/Linphone/core/conference/ConferenceInfoCore.cpp index 147294dd8..38ec4b1b4 100644 --- a/Linphone/core/conference/ConferenceInfoCore.cpp +++ b/Linphone/core/conference/ConferenceInfoCore.cpp @@ -60,7 +60,8 @@ ConferenceInfoCore::ConferenceInfoCore(std::shared_ptr mHaveModel = true; auto confSchedulerModel = mConferenceInfoModel->getConferenceScheduler(); if (!confSchedulerModel) { - auto confScheduler = CoreModel::getInstance()->getCore()->createConferenceScheduler(); + auto defaultAccount = CoreModel::getInstance()->getCore()->getDefaultAccount(); + auto confScheduler = CoreModel::getInstance()->getCore()->createConferenceScheduler(defaultAccount); confSchedulerModel = Utils::makeQObject_ptr(confScheduler); mConferenceInfoModel->setConferenceScheduler(confSchedulerModel); } @@ -597,7 +598,7 @@ void ConferenceInfoCore::save() { auto confInfoModel = Utils::makeQObject_ptr(linphoneConf); auto confSchedulerModel = confInfoModel->getConferenceScheduler(); if (!confSchedulerModel) { - auto confScheduler = CoreModel::getInstance()->getCore()->createConferenceScheduler(); + auto confScheduler = CoreModel::getInstance()->getCore()->createConferenceScheduler(defaultAccount); confSchedulerModel = Utils::makeQObject_ptr(confScheduler); confInfoModel->setConferenceScheduler(confSchedulerModel); } diff --git a/Linphone/core/login/LoginPage.cpp b/Linphone/core/login/LoginPage.cpp index 430a7e684..8bbebc64b 100644 --- a/Linphone/core/login/LoginPage.cpp +++ b/Linphone/core/login/LoginPage.cpp @@ -54,7 +54,6 @@ QString LoginPage::getErrorMessage() const { } void LoginPage::setErrorMessage(const QString &error) { - // force signal emission to display the error even if it doesn't change if (mErrorMessage != error) { mErrorMessage = error; emit errorMessageChanged(error); @@ -66,6 +65,7 @@ void LoginPage::login(const QString &username, QString displayName, QString domain, LinphoneEnums::TransportType transportType) { + setErrorMessage(""); App::postModelAsync([=]() { // Create on Model thread. AccountManager *accountManager = new AccountManager(); diff --git a/Linphone/core/timezone/TimeZoneList.hpp b/Linphone/core/timezone/TimeZoneList.hpp index 4b255787b..c2b54f824 100644 --- a/Linphone/core/timezone/TimeZoneList.hpp +++ b/Linphone/core/timezone/TimeZoneList.hpp @@ -38,7 +38,7 @@ public: void initTimeZones(); int get(const QTimeZone &timeZone = QTimeZone::systemTimeZone()) const; - QHash roleNames() const; + QHash roleNames() const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; private: diff --git a/Linphone/model/setting/SettingsModel.cpp b/Linphone/model/setting/SettingsModel.cpp index 78841ed1b..9086276c5 100644 --- a/Linphone/model/setting/SettingsModel.cpp +++ b/Linphone/model/setting/SettingsModel.cpp @@ -257,8 +257,8 @@ QStringList SettingsModel::getPlaybackDevices() const { QString SettingsModel::getCaptureDevice() const { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); auto audioDevice = CoreModel::getInstance()->getCore()->getInputAudioDevice(); - return Utils::coreStringToAppString(audioDevice ? audioDevice->getId() - : CoreModel::getInstance()->getCore()->getCaptureDevice()); + if (!audioDevice) audioDevice = CoreModel::getInstance()->getCore()->getDefaultInputAudioDevice(); + return Utils::coreStringToAppString(audioDevice ? audioDevice->getId() : ""); } void SettingsModel::setCaptureDevice(const QString &device) { @@ -269,7 +269,7 @@ void SettingsModel::setCaptureDevice(const QString &device) { find_if(list.cbegin(), list.cend(), [&](const std::shared_ptr &audioItem) { return audioItem->getId() == devId; }); if (audioDevice != list.cend()) { - CoreModel::getInstance()->getCore()->setCaptureDevice(devId); + CoreModel::getInstance()->getCore()->setDefaultInputAudioDevice(*audioDevice); CoreModel::getInstance()->getCore()->setInputAudioDevice(*audioDevice); emit captureDeviceChanged(device); resetCaptureGraph(); @@ -281,8 +281,8 @@ void SettingsModel::setCaptureDevice(const QString &device) { QString SettingsModel::getPlaybackDevice() const { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); auto audioDevice = CoreModel::getInstance()->getCore()->getOutputAudioDevice(); - return Utils::coreStringToAppString(audioDevice ? audioDevice->getId() - : CoreModel::getInstance()->getCore()->getPlaybackDevice()); + if (!audioDevice) audioDevice = CoreModel::getInstance()->getCore()->getDefaultOutputAudioDevice(); + return Utils::coreStringToAppString(audioDevice ? audioDevice->getId() : ""); } void SettingsModel::setPlaybackDevice(const QString &device) { @@ -294,8 +294,7 @@ void SettingsModel::setPlaybackDevice(const QString &device) { find_if(list.cbegin(), list.cend(), [&](const std::shared_ptr &audioItem) { return audioItem->getId() == devId; }); if (audioDevice != list.cend()) { - - CoreModel::getInstance()->getCore()->setPlaybackDevice(devId); + CoreModel::getInstance()->getCore()->setDefaultOutputAudioDevice(*audioDevice); CoreModel::getInstance()->getCore()->setOutputAudioDevice(*audioDevice); CoreModel::getInstance()->getCore()->setRingerDevice(devId); emit playbackDeviceChanged(device); @@ -477,9 +476,10 @@ bool SettingsModel::getShowChats() const { return mConfig->getBool(UiSection, "disable_chat_feature", false); }*/ +// clang-format off void SettingsModel::notifyConfigReady(){ - DEFINE_NOTIFY_CONFIG_READY(assistantGoDirectlyToThirdPartySipAccountLogin, - AssistantGoDirectlyToThirdPartySipAccountLogin) + DEFINE_NOTIFY_CONFIG_READY(assistantGoDirectlyToThirdPartySipAccountLogin, + AssistantGoDirectlyToThirdPartySipAccountLogin) DEFINE_NOTIFY_CONFIG_READY(assistantThirdPartySipAccountDomain, AssistantThirdPartySipAccountDomain) DEFINE_NOTIFY_CONFIG_READY(assistantThirdPartySipAccountTransport, AssistantThirdPartySipAccountTransport) DEFINE_NOTIFY_CONFIG_READY(autoStart, AutoStart) @@ -487,66 +487,67 @@ void SettingsModel::notifyConfigReady(){ DEFINE_GETSET_CONFIG(SettingsModel, bool, Bool, disableChatFeature, DisableChatFeature, "disable_chat_feature", false) DEFINE_GETSET_CONFIG( - SettingsModel, bool, Bool, disableMeetingsFeature, DisableMeetingsFeature, "disable_meetings_feature", false) + SettingsModel, bool, Bool, disableMeetingsFeature, DisableMeetingsFeature, "disable_meetings_feature", false) DEFINE_GETSET_CONFIG(SettingsModel, - bool, - Bool, - disableBroadcastFeature, - DisableBroadcastFeature, - "disable_broadcast_feature", - false) + bool, + Bool, + disableBroadcastFeature, + DisableBroadcastFeature, + "disable_broadcast_feature", + false) DEFINE_GETSET_CONFIG(SettingsModel, bool, Bool, hideSettings, HideSettings, "hide_settings", false) -DEFINE_GETSET_CONFIG(SettingsModel, bool, Bool, hideAccountSettings, HideAccountSettings, "hide_account_settings", false) +DEFINE_GETSET_CONFIG( + SettingsModel, bool, Bool, hideAccountSettings, HideAccountSettings, "hide_account_settings", false) DEFINE_GETSET_CONFIG(SettingsModel, - bool, - Bool, - disableCallRecordings, - DisableCallRecordings, - "disable_call_recordings_feature", - false) + bool, + Bool, + disableCallRecordings, + DisableCallRecordings, + "disable_call_recordings_feature", + false) DEFINE_GETSET_CONFIG(SettingsModel, - bool, - Bool, - assistantHideCreateAccount, - AssistantHideCreateAccount, - "assistant_hide_create_account", - false) + bool, + Bool, + assistantHideCreateAccount, + AssistantHideCreateAccount, + "assistant_hide_create_account", + false) DEFINE_GETSET_CONFIG(SettingsModel, - bool, - Bool, - assistantDisableQrCode, - AssistantDisableQrCode, - "assistant_disable_qr_code", - true) + bool, + Bool, + assistantDisableQrCode, + AssistantDisableQrCode, + "assistant_disable_qr_code", + true) DEFINE_GETSET_CONFIG(SettingsModel, - bool, - Bool, - assistantHideThirdPartyAccount, - AssistantHideThirdPartyAccount, - "assistant_hide_third_party_account", - false) + bool, + Bool, + assistantHideThirdPartyAccount, + AssistantHideThirdPartyAccount, + "assistant_hide_third_party_account", + false) DEFINE_GETSET_CONFIG(SettingsModel, - bool, - Bool, - onlyDisplaySipUriUsername, - OnlyDisplaySipUriUsername, - "only_display_sip_uri_username", - false) + bool, + Bool, + onlyDisplaySipUriUsername, + OnlyDisplaySipUriUsername, + "only_display_sip_uri_username", + false) DEFINE_GETSET_CONFIG(SettingsModel, - bool, - Bool, - darkModeAllowed, - DarkModeAllowed, - "dark_mode_allowed", - false) + bool, + Bool, + darkModeAllowed, + DarkModeAllowed, + "dark_mode_allowed", + false) DEFINE_GETSET_CONFIG(SettingsModel, int, Int, maxAccount, MaxAccount, "max_account", 0) DEFINE_GETSET_CONFIG(SettingsModel, - bool, - Bool, - assistantGoDirectlyToThirdPartySipAccountLogin, - AssistantGoDirectlyToThirdPartySipAccountLogin, - "assistant_go_directly_to_third_party_sip_account_login", - false) + bool, + Bool, + assistantGoDirectlyToThirdPartySipAccountLogin, + AssistantGoDirectlyToThirdPartySipAccountLogin, + "assistant_go_directly_to_third_party_sip_account_login", + false) DEFINE_GETSET_CONFIG_STRING(SettingsModel, assistantThirdPartySipAccountDomain, AssistantThirdPartySipAccountDomain, @@ -556,12 +557,12 @@ DEFINE_GETSET_CONFIG_STRING(SettingsModel, assistantThirdPartySipAccountTransport, AssistantThirdPartySipAccountTransport, "assistant_third_party_sip_account_transport", - "TLS") + "TLS") DEFINE_GETSET_CONFIG(SettingsModel, - bool, - Bool, - autoStart, - AutoStart, - "auto_start", - false) - + bool, + Bool, + autoStart, + AutoStart, + "auto_start", + false) + // clang-format on diff --git a/Linphone/tool/Utils.cpp b/Linphone/tool/Utils.cpp index 2b3010c71..471d49c8e 100644 --- a/Linphone/tool/Utils.cpp +++ b/Linphone/tool/Utils.cpp @@ -232,13 +232,13 @@ QString Utils::formatElapsedTime(int seconds, bool dotsSeparator) { // s, m, h, d, W, M, Y // 1, 60, 3600, 86400, 604800, 2592000, 31104000 auto y = floor(seconds / 31104000); - if (y > 0) return QString::number(y) + " years"; + if (y > 0) return tr("%n year(s)", "", y); auto M = floor(seconds / 2592000); - if (M > 0) return QString::number(M) + " months"; + if (M > 0) return tr("%n month(s)", "", M); auto w = floor(seconds / 604800); - if (w > 0) return QString::number(w) + " week"; + if (w > 0) return tr("%n week(s)", "", w); auto d = floor(seconds / 86400); - if (d > 0) return QString::number(d) + " days"; + if (d > 0) return tr("%n day(s)", "", d); auto h = floor(seconds / 3600); auto m = floor((seconds - h * 3600) / 60); @@ -1326,10 +1326,13 @@ int Utils::getYear(const QDate &date) { return date.year(); } -bool Utils::isMe(const QString &address) { +VariantObject *Utils::isMe(const QString &address) { bool isMe = false; - App::postModelSync([&isMe, address]() { isMe = ToolModel::isMe(address); }); - return isMe; + VariantObject *data = new VariantObject(); + if (!data) return nullptr; + data->makeRequest([&isMe, address]() { return QVariant::fromValue(ToolModel::isMe(address)); }); + data->requestValue(); + return data; } bool Utils::isLocal(const QString &address) { bool isLocal = false; diff --git a/Linphone/tool/Utils.hpp b/Linphone/tool/Utils.hpp index cbe33b473..259d47273 100644 --- a/Linphone/tool/Utils.hpp +++ b/Linphone/tool/Utils.hpp @@ -122,7 +122,7 @@ public: Q_INVOKABLE static VariantObject *findFriendByAddress(const QString &address); Q_INVOKABLE static VariantObject *getFriendAddressSecurityLevel(const QString &address); static QString generateSavedFilename(const QString &from, const QString &to); - Q_INVOKABLE static bool isMe(const QString &address); + Q_INVOKABLE static VariantObject *isMe(const QString &address); Q_INVOKABLE static bool isLocal(const QString &address); Q_INVOKABLE static bool isUsername(const QString &txt); // Regex check static QString getCountryName(const QLocale::Territory &p_country); diff --git a/Linphone/view/App/AppWindow.qml b/Linphone/view/App/AppWindow.qml index c0414cb8c..ae5ac004e 100644 --- a/Linphone/view/App/AppWindow.qml +++ b/Linphone/view/App/AppWindow.qml @@ -39,23 +39,6 @@ ApplicationWindow { } } - property bool authenticationPopupOpened: false - Component { - id: authenticationPopupComp - AuthenticationDialog{ - property var authenticationDialog - property var callback: authenticationDialog.result - identity: authenticationDialog.username - domain: authenticationDialog.domain - onAccepted: { - authenticationDialog ? authenticationDialog.result(password) : callback(password) - close() - } - onOpened: mainWindow.authenticationPopupOpened = true - onClosed: mainWindow.authenticationPopupOpened = false - } - } - Popup { id: startCallPopup property FriendGui contact @@ -238,13 +221,6 @@ ApplicationWindow { popup.open() popup.closePopup.connect(removeFromPopupLayout) } - - function reauthenticateAccount(authenticationDialog){ - if (authenticationPopupOpened) return - console.log("Showing authentication dialog") - var popup = authenticationPopupComp.createObject(mainWindow, {"authenticationDialog": authenticationDialog}) - popup.open() - } ColumnLayout { id: popupLayout diff --git a/Linphone/view/App/Layout/MainLayout.qml b/Linphone/view/App/Layout/MainLayout.qml index 708a3040a..58ee80c05 100644 --- a/Linphone/view/App/Layout/MainLayout.qml +++ b/Linphone/view/App/Layout/MainLayout.qml @@ -68,7 +68,7 @@ Item { AccountProxy { id: accountProxy - onDefaultAccountChanged: if (tabbar.currentIndex === 0 && defaultAccount) defaultAccount.core.lResetMissedCalls() + onDefaultAccountChanged: if (tabbar.currentIndex === 0 && defaultAccount) defaultAccount.core?.lResetMissedCalls() } CallProxy { @@ -146,7 +146,7 @@ Item { ] onCurrentIndexChanged: { SettingsCpp.setLastActiveTabIndex(currentIndex) - if (currentIndex === 0 && accountProxy.defaultAccount) accountProxy.defaultAccount.core.lResetMissedCalls() + if (currentIndex === 0 && accountProxy.defaultAccount) accountProxy.defaultAccount.core?.lResetMissedCalls() if (mainItem.contextualMenuOpenedComponent) { closeContextualMenuComponent() } diff --git a/Linphone/view/App/Main.qml b/Linphone/view/App/Main.qml index b23db3987..4bd0ac85a 100644 --- a/Linphone/view/App/Main.qml +++ b/Linphone/view/App/Main.qml @@ -56,6 +56,31 @@ AppWindow { mainWindowStackView.replace(loginPage) } + property bool authenticationPopupOpened: false + Component { + id: authenticationPopupComp + AuthenticationDialog{ + property var authenticationDialog + property var callback: authenticationDialog.result + identity: authenticationDialog.username + domain: authenticationDialog.domain + onAccepted: { + authenticationDialog ? authenticationDialog.result(password) : callback(password) + close() + } + onOpened: mainWindow.authenticationPopupOpened = true + onClosed: mainWindow.authenticationPopupOpened = false + } + } + + function reauthenticateAccount(authenticationDialog){ + if (mainWindowStackView.currentItem.objectName !== "mainPage") return + if (authenticationPopupOpened) return + console.log("Showing authentication dialog") + var popup = authenticationPopupComp.createObject(mainWindow, {"authenticationDialog": authenticationDialog}) + popup.open() + } + Connections { target: SettingsCpp function onAssistantGoDirectlyToThirdPartySipAccountLoginChanged() { @@ -168,6 +193,7 @@ AppWindow { Component { id: mainPage MainLayout { + objectName: "mainPage" onAddAccountRequest: goToLogin() onAccountRemoved: { initStackViewItem() diff --git a/Linphone/view/Item/Contact/Avatar.qml b/Linphone/view/Item/Contact/Avatar.qml index 1578956c4..61d1a340c 100644 --- a/Linphone/view/Item/Contact/Avatar.qml +++ b/Linphone/view/Item/Contact/Avatar.qml @@ -17,7 +17,7 @@ StackView { property FriendGui contact: null property CallGui call: null property string _address: account - ? account.core.identityAddress + ? account.core?.identityAddress || "" : call ? call.core.peerAddress : contact @@ -26,7 +26,7 @@ StackView { readonly property string address: SettingsCpp.onlyDisplaySipUriUsername ? UtilsCpp.getUsername(_address) : _address property var displayNameObj: UtilsCpp.getDisplayName(_address) property string displayNameVal: displayNameObj ? displayNameObj.value : "" - property bool haveAvatar: (account && account.core.pictureUri ) + property bool haveAvatar: (account && account.core?.pictureUri || false) || (contact && contact.core.pictureUri) || computedAvatarUri.length != 0 property string computedAvatarUri: UtilsCpp.findAvatarByAddress(_address) @@ -43,9 +43,11 @@ StackView { property bool securityBreach: securityLevel === LinphoneEnums.SecurityLevel.Unsafe - property bool displayPresence: (account || contact) && (account - ? account.core.registrationState != LinphoneEnums.RegistrationState.Progress && account.core.registrationState != LinphoneEnums.RegistrationState.Refreshing - : contact.core.consolidatedPresence != LinphoneEnums.ConsolidatedPresence.Offline) + property bool displayPresence: account + ? account.core?.registrationState != LinphoneEnums.RegistrationState.Progress && account.core?.registrationState != LinphoneEnums.RegistrationState.Refreshing || false + : contact + ? contact.core?.consolidatedPresence != LinphoneEnums.ConsolidatedPresence.Offline || false + : false initialItem: haveAvatar ? avatar : initials @@ -80,11 +82,11 @@ StackView { anchors.rightMargin: mainItem.width / 15 z: 1 color: account - ? account.core.registrationState == LinphoneEnums.RegistrationState.Ok + ? account.core?.registrationState == LinphoneEnums.RegistrationState.Ok ? DefaultStyle.success_500main - : account.core.registrationState == LinphoneEnums.RegistrationState.Cleared || account.core.registrationState == LinphoneEnums.RegistrationState.None + : account.core?.registrationState == LinphoneEnums.RegistrationState.Cleared || account.core?.registrationState == LinphoneEnums.RegistrationState.None ? DefaultStyle.warning_600 - : account.core.registrationState == LinphoneEnums.RegistrationState.Progress || account.core.registrationState == LinphoneEnums.RegistrationState.Refreshing + : account.core?.registrationState == LinphoneEnums.RegistrationState.Progress || account.core?.registrationState == LinphoneEnums.RegistrationState.Refreshing ? DefaultStyle.main2_500main : DefaultStyle.danger_500main : contact diff --git a/Linphone/view/Item/Contact/Sticker.qml b/Linphone/view/Item/Contact/Sticker.qml index 24166219f..70e85cdc9 100644 --- a/Linphone/view/Item/Contact/Sticker.qml +++ b/Linphone/view/Item/Contact/Sticker.qml @@ -82,7 +82,8 @@ Item { } Text { id: waitingTime - visible: !UtilsCpp.isMe(mainItem.peerAddress) + property var isMeObj: UtilsCpp.isMe(mainItem.peerAddress) + visible: isMeObj ? !isMeObj.value : false property int seconds text: UtilsCpp.formatElapsedTime(seconds) color: DefaultStyle.grey_0 diff --git a/Linphone/view/Item/ErrorText.qml b/Linphone/view/Item/ErrorText.qml index 7f0a2267a..4e69ebec6 100644 --- a/Linphone/view/Item/ErrorText.qml +++ b/Linphone/view/Item/ErrorText.qml @@ -7,6 +7,13 @@ import Linphone Text { id: mainItem color: DefaultStyle.danger_500main + function clear() { + autoHideErrorMessage.stop() + text = "" + } + function setText(text) { + mainItem.text = text + } font { pixelSize: 12 * DefaultStyle.dp weight: 300 * DefaultStyle.dp diff --git a/Linphone/view/Item/Form/LoginForm.qml b/Linphone/view/Item/Form/LoginForm.qml index 32d404814..98adff99e 100644 --- a/Linphone/view/Item/Form/LoginForm.qml +++ b/Linphone/view/Item/Form/LoginForm.qml @@ -43,7 +43,7 @@ ColumnLayout { Connections { target: LoginPageCpp function onErrorMessageChanged() { - errorText.text = LoginPageCpp.errorMessage + errorText.setText(LoginPageCpp.errorMessage) } function onRegistrationStateChanged() { if (LoginPageCpp.registrationState === LinphoneEnums.RegistrationState.Ok) { @@ -101,7 +101,7 @@ ColumnLayout { function trigger() { username.errorMessage = "" password.errorMessage = "" - errorText.text = "" + errorText.clear() if (usernameEdit.text.length == 0 || passwordEdit.text.length == 0) { if (usernameEdit.text.length == 0) diff --git a/Linphone/view/Item/Meeting/MeetingList.qml b/Linphone/view/Item/Meeting/MeetingList.qml index a40298f10..60090a4ef 100644 --- a/Linphone/view/Item/Meeting/MeetingList.qml +++ b/Linphone/view/Item/Meeting/MeetingList.qml @@ -21,7 +21,7 @@ ListView { onCountChanged: selectedConference = model && currentIndex != -1 && currentIndex < model.count ? model.getAt(currentIndex) : null onCurrentIndexChanged: { - selectedConference = model.getAt(currentIndex) + selectedConference = model.getAt(currentIndex) || null } onVisibleChanged: if( visible) { mainItem.positionViewAtIndex(currentIndex, ListView.Center)// First approximative move diff --git a/Linphone/view/Item/VerticalTabBar.qml b/Linphone/view/Item/VerticalTabBar.qml index 6ab962f06..7cbdee4c2 100644 --- a/Linphone/view/Item/VerticalTabBar.qml +++ b/Linphone/view/Item/VerticalTabBar.qml @@ -15,7 +15,7 @@ Control.TabBar { property AccountGui defaultAccount onDefaultAccountChanged: { - if (defaultAccount) defaultAccount.core.lRefreshNotifications() + if (defaultAccount) defaultAccount.core?.lRefreshNotifications() } component UnreadNotification: Rectangle { @@ -94,9 +94,9 @@ Control.TabBar { unread: !defaultAccount ? -1 : index == 0 - ? defaultAccount.core.unreadCallNotifications + ? defaultAccount.core?.unreadCallNotifications || -1 : index == 2 - ? defaultAccount.core.unreadMessageNotifications + ? defaultAccount.core?.unreadMessageNotifications || -1 : 0 anchors.right: parent.right anchors.rightMargin: 15 * DefaultStyle.dp diff --git a/Linphone/view/Page/Main/CallPage.qml b/Linphone/view/Page/Main/CallPage.qml index c3024a4a3..1d9d63ad0 100644 --- a/Linphone/view/Page/Main/CallPage.qml +++ b/Linphone/view/Page/Main/CallPage.qml @@ -20,8 +20,8 @@ AbstractMainPage { property ConferenceInfoGui confInfoGui property AccountProxy accounts: AccountProxy {id: accountProxy} property AccountGui account: accountProxy.defaultAccount - property var state: account && account.core.registrationState || 0 - property bool isRegistered: account ? account.core.registrationState == LinphoneEnums.RegistrationState.Ok : false + property var state: account && account.core?.registrationState || 0 + property bool isRegistered: account ? account.core?.registrationState == LinphoneEnums.RegistrationState.Ok : false property int selectedParticipantsCount signal startGroupCallRequested() signal createCallFromSearchBarRequested() diff --git a/Linphone/view/Page/Main/MeetingPage.qml b/Linphone/view/Page/Main/MeetingPage.qml index aad8f9369..3f3975341 100644 --- a/Linphone/view/Page/Main/MeetingPage.qml +++ b/Linphone/view/Page/Main/MeetingPage.qml @@ -560,7 +560,8 @@ AbstractMainPage { } Button { id: editButton - visible: mainItem.selectedConference && UtilsCpp.isMe(mainItem.selectedConference.core.organizerAddress) + property var isMeObj: UtilsCpp.isMe(mainItem.selectedConference?.core.organizerAddress) + visible: mainItem.selectedConference && isMeObj && isMeObj.value || false Layout.preferredWidth: 24 * DefaultStyle.dp Layout.preferredHeight: 24 * DefaultStyle.dp icon.width: 24 * DefaultStyle.dp @@ -588,6 +589,7 @@ AbstractMainPage { color: deletePopup.popupBackgroundColor borderColor: deletePopup.popupBackgroundColor inversedColors: true + property var isMeObj: UtilsCpp.isMe(mainItem.selectedConference?.core.organizerAddress) contentItem: RowLayout { EffectImage { imageSource: AppIcons.trashCan @@ -609,7 +611,7 @@ AbstractMainPage { } onClicked: { if (mainItem.selectedConference) { - cancelAndDeleteConfDialog.cancel = UtilsCpp.isMe(mainItem.selectedConference.core.organizerAddress) + cancelAndDeleteConfDialog.cancel = isMeObj? isMeObj.value : false cancelAndDeleteConfDialog.open() // mainItem.contactDeletionRequested(mainItem.selectedConference) deletePopup.close() diff --git a/external/linphone-sdk b/external/linphone-sdk index 7f93384a7..86749bbcd 160000 --- a/external/linphone-sdk +++ b/external/linphone-sdk @@ -1 +1 @@ -Subproject commit 7f93384a7206b754c1f550751a633ab1e8fee076 +Subproject commit 86749bbcd54f72f5405030619ea5c9097dbc54a9