/
no-qt-accessibility.patch
118 lines (107 loc) · 3.56 KB
/
no-qt-accessibility.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
--- a/ui/qt/byte_view_tab.cpp
+++ b/ui/qt/byte_view_tab.cpp
@@ -36,7 +36,9 @@
edt_(edt_fixed),
disable_hover_(false)
{
+#ifndef QT_NO_ACCESSIBILITY
setAccessibleName(tr("Packet bytes"));
+#endif
setTabPosition(QTabWidget::South);
setDocumentMode(true);
@@ -104,7 +106,9 @@
}
ByteViewText * byte_view_text = new ByteViewText(data, encoding, this);
+#ifndef QT_NO_ACCESSIBILITY
byte_view_text->setAccessibleName(name);
+#endif
byte_view_text->setMonospaceFont(mainApp->monospaceFont(true));
if (tvb)
--- a/ui/qt/packet_diagram.cpp
+++ b/ui/qt/packet_diagram.cpp
@@ -352,7 +352,9 @@
selected_field_(nullptr),
y_pos_(0)
{
+#ifndef QT_NO_ACCESSIBILITY
setAccessibleName(tr("Packet diagram"));
+#endif
setRenderHint(QPainter::Antialiasing);
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -212,7 +212,9 @@
setRootIsDecorated(false);
setSortingEnabled(prefs.gui_packet_list_sortable);
setUniformRowHeights(true);
+#ifndef QT_NO_ACCESSIBILITY
setAccessibleName("Packet list");
+#endif
proto_prefs_menus_.setTitle(tr("Protocol Preferences"));
--- a/ui/qt/proto_tree.cpp
+++ b/ui/qt/proto_tree.cpp
@@ -54,7 +54,9 @@
cap_file_(NULL),
edt_(edt_fixed)
{
+#ifndef QT_NO_ACCESSIBILITY
setAccessibleName(tr("Packet details"));
+#endif
// Leave the uniformRowHeights property as-is (false) since items might
// have multiple lines (e.g. packet comments). If this slows things down
// too much we should add a custom delegate which handles SizeHintRole
--- a/ui/qt/widgets/capture_filter_combo.cpp
+++ b/ui/qt/widgets/capture_filter_combo.cpp
@@ -35,7 +35,9 @@
// Default is Preferred.
setSizePolicy(QSizePolicy::MinimumExpanding, sizePolicy().verticalPolicy());
setInsertPolicy(QComboBox::NoInsert);
+#ifndef QT_NO_ACCESSIBILITY
setAccessibleName(tr("Capture filter selector"));
+#endif
updateStyleSheet();
connect(this, &CaptureFilterCombo::interfacesChanged, cf_edit_,
--- a/ui/qt/widgets/capture_filter_edit.cpp
+++ b/ui/qt/widgets/capture_filter_edit.cpp
@@ -124,7 +124,9 @@
clear_button_(NULL),
apply_button_(NULL)
{
+#ifndef QT_NO_ACCESSIBILITY
setAccessibleName(tr("Capture filter entry"));
+#endif
completion_model_ = new QStringListModel(this);
setCompleter(new QCompleter(completion_model_, this));
--- a/ui/qt/widgets/display_filter_combo.cpp
+++ b/ui/qt/widgets/display_filter_combo.cpp
@@ -43,7 +43,9 @@
setInsertPolicy(QComboBox::NoInsert);
// Default is Preferred.
setSizePolicy(QSizePolicy::MinimumExpanding, sizePolicy().verticalPolicy());
+#ifndef QT_NO_ACCESSIBILITY
setAccessibleName(tr("Display filter selector"));
+#endif
cur_display_filter_combo = this;
updateStyleSheet();
setToolTip(tr("Select from previously used filters."));
--- a/ui/qt/widgets/display_filter_edit.cpp
+++ b/ui/qt/widgets/display_filter_edit.cpp
@@ -73,7 +73,9 @@
leftAlignActions_(false),
last_applied_(QString())
{
+#ifndef QT_NO_ACCESSIBILITY
setAccessibleName(tr("Display filter entry"));
+#endif
completion_model_ = new QStringListModel(this);
setCompleter(new QCompleter(completion_model_, this));
--- a/ui/qt/widgets/field_filter_edit.cpp
+++ b/ui/qt/widgets/field_filter_edit.cpp
@@ -48,7 +48,9 @@
FieldFilterEdit::FieldFilterEdit(QWidget *parent) :
SyntaxLineEdit(parent)
{
+#ifndef QT_NO_ACCESSIBILITY
setAccessibleName(tr("Display filter entry"));
+#endif
completion_model_ = new QStringListModel(this);
setCompleter(new QCompleter(completion_model_, this));