Skip to content

Commit 2645b82

Browse files
committed
Merge pull request #8397 from ErikMelton/unauthorized-http-get-requests-from-notifications
Require textFormat declaration for all Text elements (cherry picked from commit 468b511)
1 parent 9c1ec52 commit 2645b82

43 files changed

Lines changed: 1068 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

shell/Ui/Button.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ BorderSurface {
138138
radius: 0
139139
}
140140
contentItem: Text {
141+
textFormat: Text.PlainText
141142
text: root.tooltipText
142143
color: root.tooltipForeground
143144
font.family: root.fontFamily
@@ -158,6 +159,7 @@ BorderSurface {
158159
spacing: Style.spacing.controlGap
159160

160161
Text {
162+
textFormat: Text.PlainText
161163
visible: root.iconText !== ""
162164
text: root.iconText
163165
color: root.selected ? root._selectedColor : root.foreground
@@ -177,6 +179,7 @@ BorderSurface {
177179
}
178180

179181
Text {
182+
textFormat: Text.PlainText
180183
visible: root.text !== ""
181184
text: root.text
182185
color: root.selected ? root._selectedColor : root.foreground

shell/Ui/ConfirmDialog.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Item {
6969

7070
Text {
7171
id: messageText
72+
textFormat: Text.PlainText
7273
anchors.left: parent.left
7374
anchors.right: parent.right
7475
anchors.top: parent.top
@@ -105,6 +106,7 @@ Item {
105106
radius: 0
106107

107108
Text {
109+
textFormat: Text.PlainText
108110
anchors.centerIn: parent
109111
text: modelData
110112
color: destructive ? (selected ? Color.urgent : root.foreground) : (selected ? root.selectedText : root.foreground)

shell/Ui/Dropdown.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Item {
7171
spacing: Style.spacing.labelGap
7272

7373
Text {
74+
textFormat: Text.PlainText
7475
visible: root.showLabel && root.label !== ""
7576
text: root.label
7677
color: Qt.darker(root.foreground, 1.4)
@@ -110,6 +111,7 @@ Item {
110111
}
111112

112113
Text {
114+
textFormat: Text.PlainText
113115
anchors.left: parent.left
114116
anchors.right: chevron.left
115117
anchors.verticalCenter: parent.verticalCenter
@@ -214,6 +216,7 @@ Item {
214216
: "transparent"
215217

216218
Text {
219+
textFormat: Text.PlainText
217220
anchors.left: parent.left
218221
anchors.right: parent.right
219222
anchors.verticalCenter: parent.verticalCenter

shell/Ui/MultiSelect.qml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ Item {
259259
spacing: Style.spacing.labelGap
260260

261261
Text {
262+
textFormat: Text.PlainText
262263
visible: root.showLabel && root.label !== ""
263264
text: root.label
264265
color: Qt.darker(root.foreground, 1.4)
@@ -298,6 +299,7 @@ Item {
298299
}
299300

300301
Text {
302+
textFormat: Text.PlainText
301303
anchors.left: parent.left
302304
anchors.right: chevron.left
303305
anchors.verticalCenter: parent.verticalCenter
@@ -451,6 +453,7 @@ Item {
451453
: Border.controlSpec("normal", root.foreground, root.accent)
452454

453455
Text {
456+
textFormat: Text.PlainText
454457
anchors.centerIn: parent
455458
text: root.loadingOptions ? "󰦖" : "󰑐"
456459
color: root.foreground
@@ -486,6 +489,7 @@ Item {
486489
height: popup.height - searchHeader.height - Style.spacing.xxs - 1
487490

488491
Text {
492+
textFormat: Text.PlainText
489493
anchors.centerIn: parent
490494
visible: resultList.count === 0
491495
text: root.loadingOptions ? "Loading…" : (root.optionsError !== "" ? root.optionsError : root.emptyText)
@@ -581,6 +585,7 @@ Item {
581585
spacing: Style.spacing.xxs
582586

583587
Text {
588+
textFormat: Text.PlainText
584589
text: modelData.label
585590
color: index === resultList.currentIndex ? Style.hoverStateColor(root.foreground, root.accent) : root.foreground
586591
font.family: root.fontFamily
@@ -589,6 +594,7 @@ Item {
589594
width: parent.width
590595
}
591596
Text {
597+
textFormat: Text.PlainText
592598
visible: text !== ""
593599
text: modelData.description
594600
color: Qt.darker(root.foreground, 1.5)

shell/Ui/NumberField.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Column {
2525
spacing: Style.spacing.md
2626

2727
Text {
28+
textFormat: Text.PlainText
2829
visible: root.label !== ""
2930
text: root.label
3031
color: Qt.darker(root.foreground, 1.4)

shell/Ui/OpticalGlyph.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Item {
2525

2626
Text {
2727
id: glyph
28+
textFormat: Text.PlainText
2829
// Keep the shared line box and baseline intact. Correcting only the
2930
// horizontal painted bounds avoids per-glyph vertical drift.
3031
anchors.centerIn: parent

shell/Ui/PanelActionButton.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ BorderSurface {
6969
Behavior on color { ColorAnimation { duration: 60 } }
7070

7171
Text {
72+
textFormat: Text.PlainText
7273
anchors.centerIn: parent
7374
text: root.iconText
7475
color: root.enabled

shell/Ui/PanelHero.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Item {
4848
width: parent.width
4949

5050
Text {
51+
textFormat: Text.PlainText
5152
visible: root.title !== ""
5253
text: root.title
5354
width: Math.min(implicitWidth, Math.max(0, parent.width - (detailPill.visible ? detailPill.implicitWidth + Style.space(8) : 0)))
@@ -75,6 +76,7 @@ Item {
7576

7677
Text {
7778
id: detailText
79+
textFormat: Text.PlainText
7880
anchors.centerIn: parent
7981
text: root.detail
8082
color: root.dim
@@ -87,6 +89,7 @@ Item {
8789

8890
Text {
8991
id: metaText
92+
textFormat: Text.PlainText
9093
width: parent.width
9194
text: root.meta.toUpperCase()
9295
visible: text !== ""

shell/Ui/PanelSectionHeader.qml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Text {
1111
property string fontFamily: Style.font.family
1212
property real fontSize: Style.font.caption
1313

14+
// Callers bind `text` from outside this file, so the default has to be set
15+
// here. AutoText would let a section title that happens to carry a device or
16+
// network name promote itself to rich text.
17+
textFormat: Text.PlainText
1418
color: Qt.darker(foreground, 1.4)
1519
font.family: fontFamily
1620
font.pixelSize: fontSize

shell/Ui/PanelToolTip.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ ToolTip {
3636
}
3737

3838
contentItem: Text {
39+
textFormat: Text.PlainText
3940
text: root.text
4041
color: root.panelForeground
4142
font.family: root.fontFamily

0 commit comments

Comments
 (0)