Fix build with Qt 5.

This commit is contained in:
John Preston
2026-01-28 13:03:15 +04:00
parent 5c900c2b54
commit a111727302
4 changed files with 39 additions and 1 deletions
+1
View File
@@ -460,6 +460,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_update_telegram" = "Update Telegram";
"lng_dlg_search_in" = "Search messages in";
"lng_dlg_search_from" = "From: {user}";
"lng_chat_menu" = "Chat menu";
"lng_settings_save" = "Save";
"lng_settings_apply" = "Apply";
@@ -258,6 +258,13 @@ TopBarWidget::TopBarWidget(
}, lifetime());
setCursor(style::cur_pointer);
_call->setAccessibleName(tr::lng_profile_action_short_call(tr::now));
_groupCall->setAccessibleName(tr::lng_group_call_title(tr::now));
_search->setAccessibleName(tr::lng_shortcuts_search(tr::now));
_infoToggle->setAccessibleName(tr::lng_settings_section_info(tr::now));
_menuToggle->setAccessibleName(tr::lng_chat_menu(tr::now));
_back->setAccessibleName(tr::lng_go_back(tr::now));
_cancelChoose->setAccessibleName(tr::lng_cancel(tr::now));
}
TopBarWidget::~TopBarWidget() = default;
@@ -1002,6 +1009,13 @@ void TopBarWidget::refreshInfoButton() {
}
if (_info) {
_info->setAttribute(Qt::WA_TransparentForMouseEvents);
_info->setAccessibleName(tr::lng_settings_section_info(tr::now));
if (_back && _info) {
QWidget::setTabOrder(_back.data(), _info.data());
}
if (_info && _search) {
QWidget::setTabOrder(_info.data(), _search.data());
}
}
}
@@ -16,6 +16,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_boxes.h"
#include "styles/style_chat_helpers.h"
#include "styles/style_credits.h"
#include "lang/lang_keys.h"
#include "ui/text/format_values.h"
namespace Ui {
namespace {
@@ -79,6 +81,27 @@ void SendButton::setState(State state) {
}
_state = state;
setAccessibleName([&] {
switch (_state.type) {
case Type::Send: return tr::lng_send_button(tr::now);
case Type::Record:
return tr::lng_shortcuts_record_voice_message(tr::now);
case Type::Round:
return tr::lng_shortcuts_record_round_message(tr::now);
case Type::Cancel: return tr::lng_cancel(tr::now);
case Type::Save: return tr::lng_settings_save(tr::now);
case Type::Slowmode:
return tr::lng_slowmode_enabled(
tr::now,
lt_left,
Ui::FormatDurationWordsSlowmode(_state.slowmodeDelay));
case Type::Schedule: return tr::lng_schedule_button(tr::now);
case Type::EditPrice:
return tr::lng_suggest_menu_edit_price(tr::now);
}
Unexpected("Send button type.");
}());
if (voiceRoundTransition) {
_voiceRoundAnimating = true;