Skip to content

Commit c5ab80c

Browse files
committed
Do not make ChatTextEdit translatable
Otherwise retranslateUi() will call a ChatTextEdit pointer that is nullptr.
1 parent 773e168 commit c5ab80c

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

Client/qtTeamTalk/mainwindow.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -2769,14 +2769,17 @@ void MainWindow::setupChatHistory()
27692769
if (listview)
27702770
{
27712771
auto chat = new ChatTextList(ui.chatTab);
2772+
chat->setAccessibleName(tr("History"));
27722773
delete ui.chatTab->layout()->replaceWidget(ui.chatEdit, chat);
27732774
m_chathistory[TAB_CHAT] = chat;
27742775

27752776
auto video = new ChatTextList(ui.videoTab);
2777+
video->setAccessibleName(tr("History"));
27762778
delete ui.videoTab->layout()->replaceWidget(ui.videochatEdit, video);
27772779
m_chathistory[TAB_VIDEO] = video;
27782780

27792781
auto desktop = new ChatTextList(ui.desktopTab);
2782+
desktop->setAccessibleName(tr("History"));
27802783
delete ui.desktopTab->layout()->replaceWidget(ui.desktopchatEdit, desktop);
27812784
m_chathistory[TAB_DESKTOP] = desktop;
27822785

Client/qtTeamTalk/mainwindow.ui

+12-3
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,10 @@
340340
<item>
341341
<widget class="ChatTextEdit" name="chatEdit">
342342
<property name="accessibleName">
343-
<string>History</string>
343+
<string notr="true">History</string>
344+
</property>
345+
<property name="accessibleDescription">
346+
<string notr="true"/>
344347
</property>
345348
<property name="tabChangesFocus">
346349
<bool>true</bool>
@@ -973,7 +976,10 @@
973976
<bool>false</bool>
974977
</property>
975978
<property name="accessibleName">
976-
<string>History</string>
979+
<string notr="true">History</string>
980+
</property>
981+
<property name="accessibleDescription">
982+
<string notr="true"/>
977983
</property>
978984
<property name="tabChangesFocus">
979985
<bool>true</bool>
@@ -1259,7 +1265,10 @@
12591265
<bool>false</bool>
12601266
</property>
12611267
<property name="accessibleName">
1262-
<string>History</string>
1268+
<string notr="true">History</string>
1269+
</property>
1270+
<property name="accessibleDescription">
1271+
<string notr="true"/>
12631272
</property>
12641273
<property name="tabChangesFocus">
12651274
<bool>true</bool>

Client/qtTeamTalk/textmessage.ui

+9-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<item>
3636
<widget class="QSplitter" name="splitter">
3737
<property name="orientation">
38-
<enum>Qt::Vertical</enum>
38+
<enum>Qt::Orientation::Vertical</enum>
3939
</property>
4040
<widget class="QGroupBox" name="groupBox">
4141
<property name="title">
@@ -59,11 +59,17 @@
5959
</property>
6060
<item>
6161
<widget class="ChatTextEdit" name="historyTextEdit">
62+
<property name="accessibleName">
63+
<string notr="true"/>
64+
</property>
65+
<property name="accessibleDescription">
66+
<string notr="true"/>
67+
</property>
6268
<property name="tabChangesFocus">
6369
<bool>true</bool>
6470
</property>
6571
<property name="textInteractionFlags">
66-
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
72+
<set>Qt::TextInteractionFlag::LinksAccessibleByKeyboard|Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextBrowserInteraction|Qt::TextInteractionFlag::TextSelectableByKeyboard|Qt::TextInteractionFlag::TextSelectableByMouse</set>
6773
</property>
6874
</widget>
6975
</item>
@@ -137,7 +143,7 @@
137143
<item>
138144
<spacer name="horizontalSpacer">
139145
<property name="orientation">
140-
<enum>Qt::Horizontal</enum>
146+
<enum>Qt::Orientation::Horizontal</enum>
141147
</property>
142148
<property name="sizeHint" stdset="0">
143149
<size>

Client/qtTeamTalk/textmessagedlg.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ void TextMessageDlg::init(const User& user)
6262
if (listview)
6363
{
6464
auto chat = new ChatTextList(ui.groupBox);
65+
chat->setAccessibleName(tr("History"));
6566
delete ui.groupBox->layout()->replaceWidget(ui.historyTextEdit, chat);
6667
m_history = chat;
6768
ui.historyTextEdit = nullptr;

0 commit comments

Comments
 (0)