From 20c911651f88688e0d5c8d15fbb6e781610966aa Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sun, 6 Feb 2022 18:29:24 +0300 Subject: [PATCH] Replaced universal initializers with constructors in Ui::Text::Link. --- Telegram/SourceFiles/boxes/connection_box.cpp | 2 +- .../history/admin_log/history_admin_log_item.cpp | 14 +++++++------- Telegram/SourceFiles/history/history_service.cpp | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Telegram/SourceFiles/boxes/connection_box.cpp b/Telegram/SourceFiles/boxes/connection_box.cpp index ea6bfe795..ce96ed6d6 100644 --- a/Telegram/SourceFiles/boxes/connection_box.cpp +++ b/Telegram/SourceFiles/boxes/connection_box.cpp @@ -318,7 +318,7 @@ void ProxyRow::updateFields(View &&view) { TextWithEntities() .append(_view.type) .append(' ') - .append(Ui::Text::Link(endpoint, {})), + .append(Ui::Text::Link(endpoint, QString())), Ui::ItemTextDefaultOptions()); const auto state = _view.state; diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp index 5b7a271aa..09c0e62ca 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp @@ -675,7 +675,7 @@ void GenerateItems( const auto fromName = from->name; const auto fromLink = from->createOpenLink(); - const auto fromLinkText = Ui::Text::Link(fromName, {}); + const auto fromLinkText = Ui::Text::Link(fromName, QString()); const auto addSimpleServiceMessage = [&]( const TextWithEntities &text, @@ -987,7 +987,7 @@ void GenerateItems( lt_sticker_set, Ui::Text::Link( tr::lng_admin_log_changed_stickers_set(tr::now), - {}), + QString()), Ui::Text::WithEntities); const auto setLink = std::make_shared([=]( ClickContext context) { @@ -1072,7 +1072,7 @@ void GenerateItems( lt_from, fromLinkText, lt_chat, - Ui::Text::Link(now->name, {}), + Ui::Text::Link(now->name, QString()), Ui::Text::WithEntities); const auto chatLink = std::make_shared([=] { Ui::showPeerHistory(now, ShowAtUnreadMsgId); @@ -1196,7 +1196,7 @@ void GenerateItems( const auto participantPeerLink = participantPeer->createOpenLink(); const auto participantPeerLinkText = Ui::Text::Link( participantPeer->name, - {}); + QString()); const auto text = (broadcast ? tr::lng_admin_log_muted_participant_channel : tr::lng_admin_log_muted_participant)( @@ -1215,7 +1215,7 @@ void GenerateItems( const auto participantPeerLink = participantPeer->createOpenLink(); const auto participantPeerLinkText = Ui::Text::Link( participantPeer->name, - {}); + QString()); const auto text = (broadcast ? tr::lng_admin_log_unmuted_participant_channel : tr::lng_admin_log_unmuted_participant)( @@ -1319,7 +1319,7 @@ void GenerateItems( const auto participantPeerLink = participantPeer->createOpenLink(); const auto participantPeerLinkText = Ui::Text::Link( participantPeer->name, - {}); + QString()); const auto volume = data.vparticipant().match([&]( const MTPDgroupCallParticipant &data) { return data.vvolume().value_or(10000); @@ -1395,7 +1395,7 @@ void GenerateItems( lt_link, linkText, lt_user, - Ui::Text::Link(user->name, {}), + Ui::Text::Link(user->name, QString()), Ui::Text::WithEntities), data.vinvite(), user->createOpenLink()); diff --git a/Telegram/SourceFiles/history/history_service.cpp b/Telegram/SourceFiles/history/history_service.cpp index 9a4716fca..1a9c1f38d 100644 --- a/Telegram/SourceFiles/history/history_service.cpp +++ b/Telegram/SourceFiles/history/history_service.cpp @@ -143,7 +143,7 @@ void HistoryService::setMessageByAction(const MTPmessageAction &action) { auto user = history()->owner().user(users[i].v); result.links.push_back(user->createOpenLink()); - auto linkText = Ui::Text::Link(user->name, {}); + auto linkText = Ui::Text::Link(user->name, QString()); if (i == 0) { result.text = linkText; } else if (i + 1 == l) { @@ -964,7 +964,7 @@ HistoryService::PreparedText HistoryService::prepareGameScoreText() { column, gamescore->msg->fullId())); auto titleText = game->title; - return Ui::Text::Link(titleText, {}); + return Ui::Text::Link(titleText, QString()); } } return tr::lng_deleted_message(tr::now, Ui::Text::WithEntities); @@ -1027,7 +1027,7 @@ HistoryService::PreparedText HistoryService::preparePaymentSentText() { if (payment->msg) { if (const auto media = payment->msg->media()) { if (const auto invoice = media->invoice()) { - return Ui::Text::Link(invoice->title, {}); + return Ui::Text::Link(invoice->title, QString()); } } } @@ -1519,7 +1519,7 @@ HistoryService::PreparedText GenerateJoinedText( : tr::lng_action_add_you)( tr::now, lt_from, - Ui::Text::Link(inviter->name, {}), + Ui::Text::Link(inviter->name, QString()), Ui::Text::WithEntities); return result; } else if (history->peer->isMegagroup()) { @@ -1534,7 +1534,7 @@ HistoryService::PreparedText GenerateJoinedText( result.text = tr::lng_action_user_joined( tr::now, lt_from, - Ui::Text::Link(self->name, {}), + Ui::Text::Link(self->name, QString()), Ui::Text::WithEntities); return result; }