mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-03 22:35:45 +02:00
misc: avoid dirty qrc urls
e.g. <a href="test" id="fuzzelement1">test</a> is invalid and should not open qrc://components/test Also fix editId on message edition and format in the reply row. Change-Id: I570ddf18f6ba716e448e9fbadd558a4d04cdef1c
This commit is contained in:
parent
e842a44567
commit
a05632e3f4
8 changed files with 9 additions and 6 deletions
|
@ -202,7 +202,7 @@ Loader {
|
|||
dataTransferItem.hoveredLink = canOpen ?
|
||||
("file:///" + Body) : ""
|
||||
if (dataTransferItem.hoveredLink)
|
||||
Qt.openUrlExternally(dataTransferItem.hoveredLink)
|
||||
Qt.openUrlExternally(new Url(dataTransferItem.hoveredLink))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,6 +86,7 @@ Item {
|
|||
|
||||
text: ReplyToBody
|
||||
elide: Text.ElideRight
|
||||
textFormat: Text.MarkdownText
|
||||
|
||||
color: UtilsAdapter.luma(bubble.color) ?
|
||||
JamiTheme.chatviewTextColorLight :
|
||||
|
|
|
@ -83,7 +83,7 @@ SBSMessageBase {
|
|||
renderType: Text.NativeRendering
|
||||
textFormat: Text.MarkdownText
|
||||
onLinkHovered: root.hoveredLink = hoveredLink
|
||||
onLinkActivated: Qt.openUrlExternally(hoveredLink)
|
||||
onLinkActivated: Qt.openUrlExternally(new URL(hoveredLink))
|
||||
readOnly: true
|
||||
color: getBaseColor()
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ BaseModalDialog {
|
|||
textFormat: TextEdit.RichText
|
||||
selectByMouse: true
|
||||
readOnly: true
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
onLinkActivated: Qt.openUrlExternally(new Url(link))
|
||||
|
||||
TextMetrics {
|
||||
id: textMetricsjamiDeclarationHyperText
|
||||
|
@ -189,7 +189,7 @@ BaseModalDialog {
|
|||
textFormat: TextEdit.RichText
|
||||
selectByMouse: true
|
||||
readOnly: true
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
onLinkActivated: Qt.openUrlExternally(new Url(link))
|
||||
|
||||
TextMetrics {
|
||||
id: textMetricsjamiNoneWarrantyHyperText
|
||||
|
|
|
@ -70,6 +70,7 @@ Rectangle {
|
|||
}
|
||||
|
||||
text: metrics.elidedText
|
||||
textFormat: Text.MarkdownText
|
||||
color: UtilsAdapter.luma(root.color) ?
|
||||
JamiTheme.chatviewTextColorLight :
|
||||
JamiTheme.chatviewTextColorDark
|
||||
|
|
|
@ -92,7 +92,7 @@ Component {
|
|||
ctxMenu.y = mouse.y
|
||||
ctxMenu.openMenu()
|
||||
} else {
|
||||
Qt.openUrlExternally("file://" + Body)
|
||||
Qt.openUrlExternally(new Url("file://" + Body))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -180,6 +180,7 @@ MessagesAdapter::editMessage(const QString& convId, const QString& newBody, cons
|
|||
if (editId.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
set_editId("");
|
||||
lrcInstance_->getCurrentConversationModel()->editMessage(convId, newBody, editId);
|
||||
} catch (...) {
|
||||
qDebug() << "Exception during message edition:" << messageId;
|
||||
|
|
|
@ -220,7 +220,7 @@ Window {
|
|||
autoAccelerator: true
|
||||
|
||||
onClicked: Qt.openUrlExternally(
|
||||
"https://jami.net/bugs-and-improvements/")
|
||||
new Url("https://jami.net/bugs-and-improvements/"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue