mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Use base::weak_qptr / base::make_weak.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user