Use base::weak_qptr / base::make_weak.

This commit is contained in:
John Preston
2025-07-18 10:07:39 +04:00
parent 321c7120df
commit b754ad5248
189 changed files with 556 additions and 555 deletions
@@ -898,9 +898,9 @@ bool AddParticipantsBoxController::needsInviteLinkButton() {
return _peer->asChat()->canHaveInviteLink();
}
QPointer<Ui::BoxContent> AddParticipantsBoxController::showBox(
base::weak_qptr<Ui::BoxContent> AddParticipantsBoxController::showBox(
object_ptr<Ui::BoxContent> box) const {
const auto weak = Ui::MakeWeak(box.data());
const auto weak = base::make_weak(box.data());
delegate()->peerListUiShow()->showBox(std::move(box));
return weak;
}
@@ -976,7 +976,7 @@ void AddParticipantsBoxController::inviteSelectedUsers(
tr::lng_participant_invite_history(),
true,
st::defaultBoxCheckbox);
const auto weak = Ui::MakeWeak(checkbox.data());
const auto weak = base::make_weak(checkbox.data());
auto text = (users.size() == 1)
? tr::lng_participant_invite_sure(
@@ -1205,9 +1205,9 @@ void AddSpecialBoxController::migrate(
_additional.migrate(chat, channel);
}
QPointer<Ui::BoxContent> AddSpecialBoxController::showBox(
base::weak_qptr<Ui::BoxContent> AddSpecialBoxController::showBox(
object_ptr<Ui::BoxContent> box) const {
const auto weak = Ui::MakeWeak(box.data());
const auto weak = base::make_weak(box.data());
delegate()->peerListUiShow()->showBox(std::move(box));
return weak;
}