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
@@ -1022,14 +1022,14 @@ void SessionNavigation::applyBoost(
}
done({});
} else {
const auto weak = std::make_shared<QPointer<Ui::BoxContent>>();
const auto weak = std::make_shared<base::weak_qptr<Ui::BoxContent>>();
const auto reassign = [=](
std::vector<int> slots,
int groups,
int channels) {
const auto count = int(slots.size());
const auto callback = [=](Ui::BoostCounters counters) {
if (const auto strong = weak->data()) {
if (const auto strong = weak->get()) {
strong->closeBox();
}
done(counters);
@@ -2934,7 +2934,7 @@ auto SessionController::stickerOrEmojiChosen() const
return _stickerOrEmojiChosen.events();
}
QPointer<Ui::BoxContent> SessionController::show(
base::weak_qptr<Ui::BoxContent> SessionController::show(
object_ptr<Ui::BoxContent> content,
Ui::LayerOptions options,
anim::type animated) {