qml interop: refactor and remove utilsadapter from clientwrapper
- Separate utilsadapter into files and expose it to Qml so it can
be used without passing through clientwrapper.
Change-Id: I7c351d7191cd166521b6e0a685ea9d4a9731f165
Gitlab: #66
diff --git a/src/mainview/MainView.qml b/src/mainview/MainView.qml
index 1377a7d..eee9b8d 100644
--- a/src/mainview/MainView.qml
+++ b/src/mainview/MainView.qml
@@ -22,6 +22,7 @@
import QtQuick.Controls.Universal 2.12
import QtGraphicalEffects 1.14
import net.jami.Models 1.0
+import net.jami.Adapters 1.0
// Import qml component files.
@@ -196,9 +197,9 @@
toggleSettingsView()
}
- var index = ClientWrapper.utilsAdaptor.getCurrAccList().indexOf(accountId)
- var name = ClientWrapper.utilsAdaptor.getBestName(accountId, convUid)
- var id = ClientWrapper.utilsAdaptor.getBestId(accountId, convUid)
+ var index = UtilsAdapter.getCurrAccList().indexOf(accountId)
+ var name = UtilsAdapter.getBestName(accountId, convUid)
+ var id = UtilsAdapter.getBestId(accountId, convUid)
communicationPageMessageWebView.headerUserAliasLabelText = name
communicationPageMessageWebView.headerUserUserNameLabelText = (name !== id) ? id : ""
@@ -308,7 +309,7 @@
settingsView.setSelected(settingsView.selectedMenu, true)
if (needToShowCallStack
- && callStackView.responsibleAccountId === ClientWrapper.utilsAdaptor.getCurrAccId()){
+ && callStackView.responsibleAccountId === UtilsAdapter.getCurrAccId()){
if (!ClientWrapper.accountAdaptor.hasVideoCall()) {
pushCommunicationMessageWebView()
needToShowCallStack = false
@@ -419,20 +420,18 @@
communicationPageMessageWebView.headerUserUserNameLabelText = currentUserDisplayName
callStackView.needToCloseInCallConversationAndPotentialWindow()
- callStackView.responsibleAccountId = ClientWrapper.utilsAdaptor.getCurrAccId()
+ callStackView.responsibleAccountId = UtilsAdapter.getCurrAccId()
callStackView.responsibleConvUid = currentUID
callStackView.updateCorrspondingUI()
if (callStackViewShouldShow) {
if (callState === Call.Status.IN_PROGRESS || callState === Call.Status.PAUSED) {
- ClientWrapper.utilsAdaptor.setCurrentCall(
- ClientWrapper.utilsAdaptor.getCurrAccId(),
- currentUID)
+ UtilsAdapter.setCurrentCall(UtilsAdapter.getCurrAccId(), currentUID)
if (isAudioOnly)
callStackView.showAudioCallPage()
else
callStackView.showVideoCallPage(
- ClientWrapper.utilsAdaptor.getCallId(
+ UtilsAdapter.getCallId(
callStackView.responsibleAccountId,
callStackView.responsibleConvUid))
} else {
@@ -751,7 +750,7 @@
sequence: "Ctrl+Shift+A"
context: Qt.ApplicationShortcut
onActivated: {
- ClientWrapper.utilsAdaptor.makePermanentCurrentConv()
+ UtilsAdapter.makePermanentCurrentConv()
communicationPageMessageWebView.setSendContactRequestButtonVisible(false)
}
}
diff --git a/src/mainview/components/AboutPopUp.qml b/src/mainview/components/AboutPopUp.qml
index fea3ff0..740f75a 100644
--- a/src/mainview/components/AboutPopUp.qml
+++ b/src/mainview/components/AboutPopUp.qml
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
@@ -16,10 +15,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import net.jami.Models 1.0
+import net.jami.Adapters 1.0
import "../../commoncomponents"
@@ -30,7 +31,6 @@
// When dialog is opened, trigger mainViewWindow overlay which is defined in overlay.model (model : true is necessary).
modal: true
-
// Content height + margin.
contentHeight: aboutPopUpContentRectColumnLayout.height + 5 * 7
@@ -83,7 +83,7 @@
TextMetrics {
id: textMetricsjamiVersionText
font: jamiVersionText.font
- text: qsTr("version") + ": " + ClientWrapper.utilsAdaptor.getVersionStr()
+ text: qsTr("version") + ": " + UtilsAdapter.getVersionStr()
}
}
diff --git a/src/mainview/components/AudioCallPage.qml b/src/mainview/components/AudioCallPage.qml
index 0a85cf2..1994e89 100644
--- a/src/mainview/components/AudioCallPage.qml
+++ b/src/mainview/components/AudioCallPage.qml
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
@@ -16,11 +15,13 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import QtQuick.Controls.Universal 2.12
import net.jami.Models 1.0
+import net.jami.Adapters 1.0
import "../../commoncomponents"
@@ -34,11 +35,11 @@
property var linkedWebview: null
function updateUI(accountId, convUid) {
- contactImgSource = "data:image/png;base64," + ClientWrapper.utilsAdaptor.getContactImageString(
+ contactImgSource = "data:image/png;base64," + UtilsAdapter.getContactImageString(
accountId, convUid)
- bestName = ClientWrapper.utilsAdaptor.getBestName(accountId, convUid)
+ bestName = UtilsAdapter.getBestName(accountId, convUid)
- var id = ClientWrapper.utilsAdaptor.getBestId(accountId, convUid)
+ var id = UtilsAdapter.getBestId(accountId, convUid)
bestId = (bestName !== id) ? id : ""
}
diff --git a/src/mainview/components/CallOverlay.qml b/src/mainview/components/CallOverlay.qml
index 843df4c..ed5653e 100644
--- a/src/mainview/components/CallOverlay.qml
+++ b/src/mainview/components/CallOverlay.qml
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
@@ -18,12 +17,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import QtQuick.Controls.Universal 2.12
import QtQml 2.14
import net.jami.Models 1.0
+import net.jami.Adapters 1.0
import "../js/contactpickercreation.js" as ContactPickerCreation
import "../js/mediahandlerpickercreation.js" as MediaHandlerPickerCreation
diff --git a/src/mainview/components/CallStackView.qml b/src/mainview/components/CallStackView.qml
index a626f11..e93bd78 100644
--- a/src/mainview/components/CallStackView.qml
+++ b/src/mainview/components/CallStackView.qml
@@ -149,7 +149,7 @@
}
function onUpdateParticipantsInfos(infos, accountId, callId) {
- var responsibleCallId = ClientWrapper.utilsAdaptor.getCallId(responsibleAccountId, responsibleConvUid)
+ var responsibleCallId = UtilsAdapter.getCallId(responsibleAccountId, responsibleConvUid)
if (responsibleCallId === callId) {
videoCallPage.handleParticipantsInfo(infos)
}
diff --git a/src/mainview/components/ChangeLogScrollView.qml b/src/mainview/components/ChangeLogScrollView.qml
index f672e65..b4962cf 100644
--- a/src/mainview/components/ChangeLogScrollView.qml
+++ b/src/mainview/components/ChangeLogScrollView.qml
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
@@ -16,9 +15,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+
import QtQuick 2.14
import QtQuick.Controls 2.14
import net.jami.Models 1.0
+import net.jami.Adapters 1.0
ScrollView {
id: changeLogScrollView
@@ -39,7 +40,7 @@
wrapMode: Text.WordWrap
font.pointSize: JamiTheme.textFontSize - 3
- text: ClientWrapper.utilsAdaptor.getChangeLog()
+ text: UtilsAdapter.getChangeLog()
textFormat: TextEdit.RichText
MouseArea {
diff --git a/src/mainview/components/ConversationSmartListContextMenu.qml b/src/mainview/components/ConversationSmartListContextMenu.qml
index c5aa471..7a0a3cf 100644
--- a/src/mainview/components/ConversationSmartListContextMenu.qml
+++ b/src/mainview/components/ConversationSmartListContextMenu.qml
@@ -52,7 +52,7 @@
ContextMenuGenerator.addMenuItem(qsTr("Clear conversation"),
"qrc:/images/icons/ic_clear_24px.svg",
function (){
- ClientWrapper.utilsAdaptor.clearConversationHistory(
+ UtilsAdapter.clearConversationHistory(
responsibleAccountId,
responsibleConvUid)
})
@@ -61,7 +61,7 @@
ContextMenuGenerator.addMenuItem(qsTr("Remove contact"),
"qrc:/images/icons/round-remove_circle-24px.svg",
function (){
- ClientWrapper.utilsAdaptor.removeConversation(
+ UtilsAdapter.removeConversation(
responsibleAccountId,
responsibleConvUid)
})
diff --git a/src/mainview/components/ConversationSmartListView.qml b/src/mainview/components/ConversationSmartListView.qml
index 1d61c5b..a9da6ee 100644
--- a/src/mainview/components/ConversationSmartListView.qml
+++ b/src/mainview/components/ConversationSmartListView.qml
@@ -121,8 +121,8 @@
context: Qt.ApplicationShortcut
enabled: root.visible
onActivated: {
- ClientWrapper.utilsAdaptor.clearConversationHistory(ClientWrapper.utilsAdaptor.getCurrAccId(),
- ClientWrapper.utilsAdaptor.getCurrConvId())
+ UtilsAdapter.clearConversationHistory(UtilsAdapter.getCurrAccId(),
+ UtilsAdapter.getCurrConvId())
}
}
@@ -131,8 +131,9 @@
context: Qt.ApplicationShortcut
enabled: root.visible
onActivated: {
- ClientWrapper.utilsAdaptor.removeConversation(ClientWrapper.utilsAdaptor.getCurrAccId(),
- ClientWrapper.utilsAdaptor.getCurrConvId(), true)
+ UtilsAdapter.removeConversation(UtilsAdapter.getCurrAccId(),
+ UtilsAdapter.getCurrConvId(),
+ true)
root.needToBackToWelcomePage()
}
}
@@ -142,8 +143,9 @@
context: Qt.ApplicationShortcut
enabled: root.visible
onActivated: {
- ClientWrapper.utilsAdaptor.removeConversation(ClientWrapper.utilsAdaptor.getCurrAccId(),
- ClientWrapper.utilsAdaptor.getCurrConvId(), false)
+ UtilsAdapter.removeConversation(UtilsAdapter.getCurrAccId(),
+ UtilsAdapter.getCurrConvId(),
+ false)
}
}
diff --git a/src/mainview/components/ConversationSmartListViewItemDelegate.qml b/src/mainview/components/ConversationSmartListViewItemDelegate.qml
index 5357dc6..bc600f7 100644
--- a/src/mainview/components/ConversationSmartListViewItemDelegate.qml
+++ b/src/mainview/components/ConversationSmartListViewItemDelegate.qml
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
@@ -16,10 +15,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import net.jami.Models 1.0
+import net.jami.Adapters 1.0
import "../../commoncomponents"
@@ -135,7 +136,7 @@
elide: Text.ElideRight
elideWidth: LastInteractionDate ? (smartListItemDelegate.width - lastInteractionPreferredWidth - conversationSmartListUserImage.width-32) :
smartListItemDelegate.width - lastInteractionPreferredWidth
- text: InCall ? ClientWrapper.utilsAdaptor.getCallStatusStr(CallState) : (Draft ? Draft : LastInteraction)
+ text: InCall ? UtilsAdapter.getCallStatusStr(CallState) : (Draft ? Draft : LastInteraction)
}
font.hintingPreference: Font.PreferNoHinting
@@ -168,8 +169,9 @@
}
onDoubleClicked: {
if (!InCall) {
- ConversationsAdapter.selectConversation(ClientWrapper.utilsAdaptor.getCurrAccId(),
- UID, false)
+ ConversationsAdapter.selectConversation(UtilsAdapter.getCurrAccId(),
+ UID,
+ false)
CallAdapter.placeCall()
}
}
@@ -185,7 +187,7 @@
mouse.x, mouse.y)
smartListContextMenu.x = relativeMousePos.x
smartListContextMenu.y = relativeMousePos.y
- smartListContextMenu.responsibleAccountId = ClientWrapper.utilsAdaptor.getCurrAccId()
+ smartListContextMenu.responsibleAccountId = UtilsAdapter.getCurrAccId()
smartListContextMenu.responsibleConvUid = UID
smartListContextMenu.contactType = ContactType
userProfile.responsibleConvUid = UID
diff --git a/src/mainview/components/IncomingCallPage.qml b/src/mainview/components/IncomingCallPage.qml
index 9955efc..87d68ee 100644
--- a/src/mainview/components/IncomingCallPage.qml
+++ b/src/mainview/components/IncomingCallPage.qml
@@ -49,11 +49,11 @@
function updateUI() {
incomingCallPage.contactImgSource = "data:image/png;base64,"
- + ClientWrapper.utilsAdaptor.getContactImageString(responsibleAccountId,
+ + UtilsAdapter.getContactImageString(responsibleAccountId,
responsibleConvUid)
- incomingCallPage.bestName = ClientWrapper.utilsAdaptor.getBestName(
+ incomingCallPage.bestName = UtilsAdapter.getBestName(
responsibleAccountId, responsibleConvUid)
- var id = ClientWrapper.utilsAdaptor.getBestId(responsibleAccountId,
+ var id = UtilsAdapter.getBestId(responsibleAccountId,
responsibleConvUid)
incomingCallPage.bestId = (incomingCallPage.bestName !== id) ? id : ""
}
diff --git a/src/mainview/components/MessageWebView.qml b/src/mainview/components/MessageWebView.qml
index 8453c41..8893cad 100644
--- a/src/mainview/components/MessageWebView.qml
+++ b/src/mainview/components/MessageWebView.qml
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
@@ -16,16 +15,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import QtWebEngine 1.10
import QtWebChannel 1.14
import net.jami.Models 1.0
+import net.jami.Adapters 1.0
import "../../commoncomponents"
-
Rectangle {
id: messageWebViewRect
@@ -66,7 +66,7 @@
onAccepted: {
var filePaths = jamiFileDialog.files
for (var index = 0; index < filePaths.length; ++index) {
- var path = ClientWrapper.utilsAdaptor.getAbsPath(filePaths[index])
+ var path = UtilsAdapter.getAbsPath(filePaths[index])
MessagesAdapter.setNewMessagesContent(path)
}
}
@@ -77,7 +77,7 @@
DropArea{
anchors.fill: parent
onDropped: {
- var path = ClientWrapper.utilsAdaptor.getAbsPath(drop.text.toString())
+ var path = UtilsAdapter.getAbsPath(drop.text.toString())
MessagesAdapter.setNewMessagesContent(path)
}
}
@@ -223,7 +223,7 @@
DropArea{
anchors.fill: parent
onDropped: {
- var path = ClientWrapper.utilsAdaptor.getAbsPath(drop.text.toString())
+ var path = UtilsAdapter.getAbsPath(drop.text.toString())
MessagesAdapter.setNewMessagesContent(path)
}
}
@@ -237,33 +237,33 @@
onLoadingChanged: {
if (loadRequest.status == WebEngineView.LoadSucceededStatus) {
- messageWebView.runJavaScript(ClientWrapper.utilsAdaptor.getStyleSheet(
+ messageWebView.runJavaScript(UtilsAdapter.getStyleSheet(
"chatcss",
- ClientWrapper.utilsAdaptor.qStringFromFile(
+ UtilsAdapter.qStringFromFile(
":/chatview.css")))
- messageWebView.runJavaScript(ClientWrapper.utilsAdaptor.getStyleSheet(
+ messageWebView.runJavaScript(UtilsAdapter.getStyleSheet(
"chatwin",
- ClientWrapper.utilsAdaptor.qStringFromFile(
+ UtilsAdapter.qStringFromFile(
":/chatview-windows.css")))
- messageWebView.runJavaScript(ClientWrapper.utilsAdaptor.qStringFromFile(
+ messageWebView.runJavaScript(UtilsAdapter.qStringFromFile(
":/jed.js"))
- messageWebView.runJavaScript(ClientWrapper.utilsAdaptor.qStringFromFile(
+ messageWebView.runJavaScript(UtilsAdapter.qStringFromFile(
":/linkify.js"))
- messageWebView.runJavaScript(ClientWrapper.utilsAdaptor.qStringFromFile(
+ messageWebView.runJavaScript(UtilsAdapter.qStringFromFile(
":/linkify-html.js"))
- messageWebView.runJavaScript(ClientWrapper.utilsAdaptor.qStringFromFile(
+ messageWebView.runJavaScript(UtilsAdapter.qStringFromFile(
":/linkify-string.js"))
- messageWebView.runJavaScript(ClientWrapper.utilsAdaptor.qStringFromFile(
+ messageWebView.runJavaScript(UtilsAdapter.qStringFromFile(
":/qwebchannel.js"))
- messageWebView.runJavaScript(ClientWrapper.utilsAdaptor.qStringFromFile(
+ messageWebView.runJavaScript(UtilsAdapter.qStringFromFile(
":/chatview.js"))
messageWebView.runJavaScript("init_i18n();")
messageWebView.runJavaScript("displayNavbar(false);")
}
}
Component.onCompleted: {
- messageWebView.loadHtml(ClientWrapper.utilsAdaptor.qStringFromFile(
+ messageWebView.loadHtml(UtilsAdapter.qStringFromFile(
":/chatview.html"), ":/chatview.html")
messageWebView.url = "qrc:/chatview.html"
}
@@ -274,8 +274,8 @@
WebEngineProfile {
id: messageWebViewProfile
- cachePath: ClientWrapper.utilsAdaptor.getCachePath()
- persistentStoragePath: ClientWrapper.utilsAdaptor.getCachePath()
+ cachePath: UtilsAdapter.getCachePath()
+ persistentStoragePath: UtilsAdapter.getCachePath()
persistentCookiesPolicy: WebEngineProfile.NoPersistentCookies
httpCacheType: WebEngineProfile.NoCache
httpUserAgent: "jami-windows"
diff --git a/src/mainview/components/OutgoingCallPage.qml b/src/mainview/components/OutgoingCallPage.qml
index 4d2171a..5acd403 100644
--- a/src/mainview/components/OutgoingCallPage.qml
+++ b/src/mainview/components/OutgoingCallPage.qml
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
@@ -16,11 +15,13 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import QtQuick.Controls.Universal 2.12
import net.jami.Models 1.0
+import net.jami.Adapters 1.0
import "../../commoncomponents"
@@ -36,10 +37,10 @@
signal callCancelButtonIsClicked
function updateUI(accountId, convUid) {
- contactImgSource = "data:image/png;base64," + ClientWrapper.utilsAdaptor.getContactImageString(
+ contactImgSource = "data:image/png;base64," + UtilsAdapter.getContactImageString(
accountId, convUid)
- bestName = ClientWrapper.utilsAdaptor.getBestName(accountId, convUid)
- var id = ClientWrapper.utilsAdaptor.getBestId(accountId, convUid)
+ bestName = UtilsAdapter.getBestName(accountId, convUid)
+ var id = UtilsAdapter.getBestId(accountId, convUid)
bestId = (bestName !== id) ? id : ""
}
@@ -158,7 +159,7 @@
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
- text: ClientWrapper.utilsAdaptor.getCallStatusStr(callStatus) + "..."
+ text: UtilsAdapter.getCallStatusStr(callStatus) + "..."
color: Qt.lighter("white", 1.5)
}
}
diff --git a/src/mainview/components/ProjectCreditsScrollView.qml b/src/mainview/components/ProjectCreditsScrollView.qml
index 0606f04..32170d1 100644
--- a/src/mainview/components/ProjectCreditsScrollView.qml
+++ b/src/mainview/components/ProjectCreditsScrollView.qml
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
@@ -16,9 +15,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+
import QtQuick 2.14
import QtQuick.Controls 2.14
import net.jami.Models 1.0
+import net.jami.Adapters 1.0
ScrollView {
id: projectCreditsScrollView
@@ -41,7 +42,7 @@
wrapMode: Text.WordWrap
font.pointSize: JamiTheme.textFontSize - 3
- text: ClientWrapper.utilsAdaptor.getProjectCredits()
+ text: UtilsAdapter.getProjectCredits()
textFormat: TextEdit.RichText
MouseArea {
diff --git a/src/mainview/components/SidePanel.qml b/src/mainview/components/SidePanel.qml
index 2a59f50..e1fd9a3 100644
--- a/src/mainview/components/SidePanel.qml
+++ b/src/mainview/components/SidePanel.qml
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
@@ -16,10 +15,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import net.jami.Models 1.0
+import net.jami.Adapters 1.0
import "../../commoncomponents"
@@ -54,11 +55,11 @@
}
function updatePendingRequestCount() {
- pendingRequestCount = ClientWrapper.utilsAdaptor.getTotalPendingRequest()
+ pendingRequestCount = UtilsAdapter.getTotalPendingRequest()
}
function updateTotalUnreadMessagesCount() {
- totalUnreadMessagesCount = ClientWrapper.utilsAdaptor.getTotalUnreadMessages()
+ totalUnreadMessagesCount = UtilsAdapter.getTotalUnreadMessages()
}
function clearContactSearchBar() {
@@ -105,7 +106,7 @@
anchors.leftMargin: 16
onContactSearchBarTextChanged: {
- ClientWrapper.utilsAdaptor.setConversationFilter(text)
+ UtilsAdapter.setConversationFilter(text)
}
}
diff --git a/src/mainview/components/VideoCallPage.qml b/src/mainview/components/VideoCallPage.qml
index 5ec8c82..7d57e82 100644
--- a/src/mainview/components/VideoCallPage.qml
+++ b/src/mainview/components/VideoCallPage.qml
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
@@ -17,12 +16,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import QtQuick.Controls.Universal 2.12
import QtGraphicalEffects 1.14
import net.jami.Models 1.0
+import net.jami.Adapters 1.0
import "../../commoncomponents"
@@ -44,9 +45,9 @@
function updateUI(accountId, convUid) {
videoCallOverlay.handleParticipantsInfo(CallAdapter.getConferencesInfos())
- bestName = ClientWrapper.utilsAdaptor.getBestName(accountId, convUid)
+ bestName = UtilsAdapter.getBestName(accountId, convUid)
- var id = ClientWrapper.utilsAdaptor.getBestId(accountId, convUid)
+ var id = UtilsAdapter.getBestId(accountId, convUid)
bestId = (bestName !== id) ? id : ""
}
@@ -78,7 +79,7 @@
function handleParticipantsInfo(infos) {
if (infos.length === 0) {
- bestName = ClientWrapper.utilsAdaptor.getBestName(accountId, convUid)
+ bestName = UtilsAdapter.getBestName(accountId, convUid)
} else {
bestName = ""
}
diff --git a/src/mainview/components/WelcomePage.qml b/src/mainview/components/WelcomePage.qml
index 49d8061..7e68015 100644
--- a/src/mainview/components/WelcomePage.qml
+++ b/src/mainview/components/WelcomePage.qml
@@ -136,7 +136,7 @@
radius: 30
source: "qrc:/images/icons/ic_content_copy.svg"
onClicked: {
- ClientWrapper.utilsAdaptor.setText(
+ UtilsAdapter.setText(
textMetricsjamiRegisteredNameText.text)
}
}
diff --git a/src/mainview/components/WelcomePageQrDialog.qml b/src/mainview/components/WelcomePageQrDialog.qml
index ccadf0f..2cc91c0 100644
--- a/src/mainview/components/WelcomePageQrDialog.qml
+++ b/src/mainview/components/WelcomePageQrDialog.qml
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
@@ -16,19 +15,20 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import net.jami.Models 1.0
-
+import net.jami.Adapters 1.0
Dialog {
id: userQrImageDialog
- property string accountIdStr: ClientWrapper.utilsAdaptor.getCurrAccId()
+ property string accountIdStr: UtilsAdapter.getCurrAccId()
function updateQrDialog() {
- accountIdStr = ClientWrapper.utilsAdaptor.getCurrAccId()
+ accountIdStr = UtilsAdapter.getCurrAccId()
}
// When dialog is opened, trigger mainViewWindow overlay which is defined in overlay.model.