From 7c45eccf86601eaac8c1604bc95ebb70c5348084 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Fri, 1 Jul 2022 17:41:10 +0200 Subject: [PATCH] Avoid openning a conversation on sip url and copy the URL into the smartsearchbar. --- linphone-app/src/components/url-handlers/UrlHandlers.cpp | 1 + linphone-app/ui/views/App/Calls/WaitingRoom.qml | 1 - linphone-app/ui/views/App/Main/MainWindow.qml | 9 ++------- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/linphone-app/src/components/url-handlers/UrlHandlers.cpp b/linphone-app/src/components/url-handlers/UrlHandlers.cpp index 54c87d963..ee41fbbc9 100644 --- a/linphone-app/src/components/url-handlers/UrlHandlers.cpp +++ b/linphone-app/src/components/url-handlers/UrlHandlers.cpp @@ -28,6 +28,7 @@ UrlHandlers::UrlHandlers (QObject *parent) : QObject(parent) { QDesktopServices::setUrlHandler("sip", this, "handleSip"); + QDesktopServices::setUrlHandler("sips", this, "handleSip"); } void UrlHandlers::handleSip (const QUrl &url) { diff --git a/linphone-app/ui/views/App/Calls/WaitingRoom.qml b/linphone-app/ui/views/App/Calls/WaitingRoom.qml index 864620e31..637ee8213 100644 --- a/linphone-app/ui/views/App/Calls/WaitingRoom.qml +++ b/linphone-app/ui/views/App/Calls/WaitingRoom.qml @@ -78,7 +78,6 @@ Rectangle { Layout.fillWidth: true Layout.fillHeight: true property var previewDefinition: SettingsModel.getCurrentPreviewVideoDefinition() - onPreviewDefinitionChanged: console.log(Utils.printObject(previewDefinition)) property real cameraRatio: previewDefinition.height > 0 ? previewDefinition.width/previewDefinition.height : 1.0 property int minSize: Math.min( loader.height, loader.width) property int cameraHeight: Math.min(Math.min(cameraRatio * minSize, loader.width) / cameraRatio, minSize) diff --git a/linphone-app/ui/views/App/Main/MainWindow.qml b/linphone-app/ui/views/App/Main/MainWindow.qml index cd12852eb..7e909af7d 100644 --- a/linphone-app/ui/views/App/Main/MainWindow.qml +++ b/linphone-app/ui/views/App/Main/MainWindow.qml @@ -400,12 +400,7 @@ ApplicationWindow { target: UrlHandlers onSip: { - window.setView('Conversation', { - peerAddress: sipAddress, - localAddress: AccountSettingsModel.sipAddress, - fullPeerAddress: sipAddress, - fullLocalAddress: AccountSettingsModel.fullSipAddress - }) - } + mainSearchBar.text = sipAddress + } } }