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 ?
|
dataTransferItem.hoveredLink = canOpen ?
|
||||||
("file:///" + Body) : ""
|
("file:///" + Body) : ""
|
||||||
if (dataTransferItem.hoveredLink)
|
if (dataTransferItem.hoveredLink)
|
||||||
Qt.openUrlExternally(dataTransferItem.hoveredLink)
|
Qt.openUrlExternally(new Url(dataTransferItem.hoveredLink))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,6 +86,7 @@ Item {
|
||||||
|
|
||||||
text: ReplyToBody
|
text: ReplyToBody
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
textFormat: Text.MarkdownText
|
||||||
|
|
||||||
color: UtilsAdapter.luma(bubble.color) ?
|
color: UtilsAdapter.luma(bubble.color) ?
|
||||||
JamiTheme.chatviewTextColorLight :
|
JamiTheme.chatviewTextColorLight :
|
||||||
|
|
|
@ -83,7 +83,7 @@ SBSMessageBase {
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
textFormat: Text.MarkdownText
|
textFormat: Text.MarkdownText
|
||||||
onLinkHovered: root.hoveredLink = hoveredLink
|
onLinkHovered: root.hoveredLink = hoveredLink
|
||||||
onLinkActivated: Qt.openUrlExternally(hoveredLink)
|
onLinkActivated: Qt.openUrlExternally(new URL(hoveredLink))
|
||||||
readOnly: true
|
readOnly: true
|
||||||
color: getBaseColor()
|
color: getBaseColor()
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,7 @@ BaseModalDialog {
|
||||||
textFormat: TextEdit.RichText
|
textFormat: TextEdit.RichText
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
readOnly: true
|
readOnly: true
|
||||||
onLinkActivated: Qt.openUrlExternally(link)
|
onLinkActivated: Qt.openUrlExternally(new Url(link))
|
||||||
|
|
||||||
TextMetrics {
|
TextMetrics {
|
||||||
id: textMetricsjamiDeclarationHyperText
|
id: textMetricsjamiDeclarationHyperText
|
||||||
|
@ -189,7 +189,7 @@ BaseModalDialog {
|
||||||
textFormat: TextEdit.RichText
|
textFormat: TextEdit.RichText
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
readOnly: true
|
readOnly: true
|
||||||
onLinkActivated: Qt.openUrlExternally(link)
|
onLinkActivated: Qt.openUrlExternally(new Url(link))
|
||||||
|
|
||||||
TextMetrics {
|
TextMetrics {
|
||||||
id: textMetricsjamiNoneWarrantyHyperText
|
id: textMetricsjamiNoneWarrantyHyperText
|
||||||
|
|
|
@ -70,6 +70,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
text: metrics.elidedText
|
text: metrics.elidedText
|
||||||
|
textFormat: Text.MarkdownText
|
||||||
color: UtilsAdapter.luma(root.color) ?
|
color: UtilsAdapter.luma(root.color) ?
|
||||||
JamiTheme.chatviewTextColorLight :
|
JamiTheme.chatviewTextColorLight :
|
||||||
JamiTheme.chatviewTextColorDark
|
JamiTheme.chatviewTextColorDark
|
||||||
|
|
|
@ -92,7 +92,7 @@ Component {
|
||||||
ctxMenu.y = mouse.y
|
ctxMenu.y = mouse.y
|
||||||
ctxMenu.openMenu()
|
ctxMenu.openMenu()
|
||||||
} else {
|
} 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()) {
|
if (editId.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
set_editId("");
|
||||||
lrcInstance_->getCurrentConversationModel()->editMessage(convId, newBody, editId);
|
lrcInstance_->getCurrentConversationModel()->editMessage(convId, newBody, editId);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
qDebug() << "Exception during message edition:" << messageId;
|
qDebug() << "Exception during message edition:" << messageId;
|
||||||
|
|
|
@ -220,7 +220,7 @@ Window {
|
||||||
autoAccelerator: true
|
autoAccelerator: true
|
||||||
|
|
||||||
onClicked: Qt.openUrlExternally(
|
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