From d55b7ecb8e47c22398d4c30abaf9f30b4db6580d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Fri, 29 Jul 2022 21:15:02 -0400
Subject: [PATCH] misc: avoid unwanted richtext

GitLab: #784
Change-Id: I0dde4ef53d7b2471ff0aa9cba1bee463542d0573
---
 src/app/mainview/components/AccountComboBox.qml       | 4 ++++
 src/app/mainview/components/AccountComboBoxPopup.qml  | 1 +
 src/app/mainview/components/AccountItemDelegate.qml   | 4 ++++
 src/app/mainview/components/SmartListItemDelegate.qml | 5 +++++
 4 files changed, 14 insertions(+)

diff --git a/src/app/mainview/components/AccountComboBox.qml b/src/app/mainview/components/AccountComboBox.qml
index 3ced41965..eebfc0730 100644
--- a/src/app/mainview/components/AccountComboBox.qml
+++ b/src/app/mainview/components/AccountComboBox.qml
@@ -131,6 +131,8 @@ Label {
                 Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
 
                 text: CurrentAccount.bestName
+                textFormat: TextEdit.PlainText
+
                 font.pointSize: JamiTheme.textFontSize
                 color: JamiTheme.textColor
                 elide: Text.ElideRight
@@ -145,6 +147,8 @@ Label {
                 visible: text.length && text !== bestNameText.text
 
                 text:  CurrentAccount.bestId
+                textFormat: TextEdit.PlainText
+
                 font.pointSize: JamiTheme.textFontSize
                 color: JamiTheme.faddedLastInteractionFontColor
                 elide: Text.ElideRight
diff --git a/src/app/mainview/components/AccountComboBoxPopup.qml b/src/app/mainview/components/AccountComboBoxPopup.qml
index 027fa6037..f5e386384 100644
--- a/src/app/mainview/components/AccountComboBoxPopup.qml
+++ b/src/app/mainview/components/AccountComboBoxPopup.qml
@@ -84,6 +84,7 @@ Popup {
                 Text {
                     anchors.centerIn: parent
                     text: JamiStrings.addAccount + "+"
+                    textFormat: TextEdit.PlainText
                     color: JamiTheme.textColor
                     font.pointSize: JamiTheme.textFontSize
                 }
diff --git a/src/app/mainview/components/AccountItemDelegate.qml b/src/app/mainview/components/AccountItemDelegate.qml
index fadb237c7..9f5dc0c06 100644
--- a/src/app/mainview/components/AccountItemDelegate.qml
+++ b/src/app/mainview/components/AccountItemDelegate.qml
@@ -70,6 +70,8 @@ ItemDelegate {
                 Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
 
                 text: Alias
+                textFormat: TextEdit.PlainText
+
                 font.pointSize: JamiTheme.textFontSize
                 color: JamiTheme.textColor
                 elide: Text.ElideRight
@@ -82,6 +84,8 @@ ItemDelegate {
                 visible: text.length && Alias != Username
 
                 text: Username
+                textFormat: TextEdit.PlainText
+
                 font.pointSize: JamiTheme.textFontSize
                 color: JamiTheme.faddedLastInteractionFontColor
                 elide: Text.ElideRight
diff --git a/src/app/mainview/components/SmartListItemDelegate.qml b/src/app/mainview/components/SmartListItemDelegate.qml
index c5f11d612..90a592156 100644
--- a/src/app/mainview/components/SmartListItemDelegate.qml
+++ b/src/app/mainview/components/SmartListItemDelegate.qml
@@ -110,6 +110,7 @@ ItemDelegate {
                 Layout.alignment: Qt.AlignVCenter
                 elide: Text.ElideMiddle
                 text: Title === undefined ? "" : Title
+                textFormat: TextEdit.PlainText
                 font.pointSize: JamiTheme.smartlistItemFontSize
                 font.weight: UnreadMessagesCount ? Font.Bold : Font.Normal
                 color: JamiTheme.textColor
@@ -127,6 +128,7 @@ ItemDelegate {
                 Text {
                     Layout.alignment: Qt.AlignVCenter
                     text: LastInteractionDate === undefined ? "" : LastInteractionDate
+                    textFormat: TextEdit.PlainText
                     font.pointSize: JamiTheme.smartlistItemInfoFontSize
                     font.weight: UnreadMessagesCount ? Font.DemiBold : Font.Normal
                     color: JamiTheme.textColor
@@ -140,6 +142,7 @@ ItemDelegate {
                     text: Draft ?
                               Draft :
                               (LastInteraction === undefined ? "" : LastInteraction)
+                    textFormat: TextEdit.PlainText
                     font.pointSize: JamiTheme.smartlistItemInfoFontSize
                     font.weight: UnreadMessagesCount ? Font.Normal : Font.Light
                     font.hintingPreference: Font.PreferNoHinting
@@ -157,6 +160,7 @@ ItemDelegate {
                 Layout.preferredHeight: 20
                 Layout.alignment: Qt.AlignVCenter
                 text: JamiStrings.banned
+                textFormat: TextEdit.PlainText
                 visible: IsBanned
                 font.pointSize: JamiTheme.smartlistItemFontSize
                 font.weight: Font.Bold
@@ -189,6 +193,7 @@ ItemDelegate {
                 Layout.preferredHeight: 20
                 Layout.alignment: Qt.AlignRight
                 text: InCall ? UtilsAdapter.getCallStatusStr(CallState) : ""
+                textFormat: TextEdit.PlainText
                 font.pointSize: JamiTheme.smartlistItemInfoFontSize
                 font.weight: Font.Medium
                 color: JamiTheme.textColor
-- 
GitLab