Removed Q_OBJECT from ScrollArea.

This commit is contained in:
23rd 2021-09-29 19:01:12 +03:00
parent e3ef7d6631
commit cb8f49aea0
10 changed files with 38 additions and 21 deletions

View File

@ -168,11 +168,10 @@ FieldAutocomplete::FieldAutocomplete(
hide();
connect(
_scroll,
&Ui::ScrollArea::geometryChanged,
_inner,
&Inner::onParentGeometryChanged);
_scroll->geometryChanged(
) | rpl::start_with_next(crl::guard(_inner, [=] {
_inner->onParentGeometryChanged();
}), lifetime());
}
not_null<Window::SessionController*> FieldAutocomplete::controller() const {

View File

@ -234,7 +234,10 @@ Widget::Widget(
}
}, lifetime());
connect(_scroll, SIGNAL(geometryChanged()), _inner, SLOT(onParentGeometryChanged()));
_scroll->geometryChanged(
) | rpl::start_with_next(crl::guard(_inner, [=] {
_inner->onParentGeometryChanged();
}), lifetime());
connect(_scroll, SIGNAL(scrolled()), this, SLOT(onListScroll()));
session().data().chatsListChanges(

View File

@ -15,6 +15,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mtproto/sender.h"
#include "api/api_single_message_search.h"
#include <QtCore/QTimer>
namespace MTP {
class Error;
} // namespace MTP

View File

@ -322,8 +322,10 @@ Widget::Widget(
_scroll->move(0, _fixedBar->height());
_scroll->show();
connect(_scroll, &Ui::ScrollArea::scrolled, this, [this] { onScroll(); });
_scroll->scrolls(
) | rpl::start_with_next([=] {
onScroll();
}, lifetime());
_whatIsThis->setClickedCallback([=] {
controller->show(Box<InformBox>(channel->isMegagroup()

View File

@ -252,9 +252,14 @@ HistoryWidget::HistoryWidget(
update();
}, lifetime());
connect(_scroll, &Ui::ScrollArea::scrolled, [=] {
_scroll->scrolls(
) | rpl::start_with_next([=] {
handleScroll();
});
}, lifetime());
_scroll->geometryChanged(
) | rpl::start_with_next(crl::guard(_list, [=] {
_list->onParentGeometryChanged();
}), lifetime());
_historyDown->addClickHandler([=] { historyDownClicked(); });
_unreadMentions->addClickHandler([=] { showNextUnreadMention(); });
_fieldBarCancel->addClickHandler([=] { cancelFieldAreaState(); });
@ -2133,8 +2138,6 @@ void HistoryWidget::showHistory(
updateControlsGeometry();
connect(_scroll, SIGNAL(geometryChanged()), _list, SLOT(onParentGeometryChanged()));
if (const auto user = _peer->asUser()) {
if (const auto &info = user->botInfo) {
if (startBot) {

View File

@ -157,7 +157,10 @@ PinnedWidget::PinnedWidget(
static_cast<ListDelegate*>(this)));
_scroll->move(0, _topBar->height());
_scroll->show();
connect(_scroll.get(), &Ui::ScrollArea::scrolled, [=] { onScroll(); });
_scroll->scrolls(
) | rpl::start_with_next([=] {
onScroll();
}, lifetime());
setupClearButton();
setupScrollDownButton();

View File

@ -224,7 +224,10 @@ RepliesWidget::RepliesWidget(
static_cast<ListDelegate*>(this)));
_scroll->move(0, _topBar->height());
_scroll->show();
connect(_scroll.get(), &Ui::ScrollArea::scrolled, [=] { onScroll(); });
_scroll->scrolls(
) | rpl::start_with_next([=] {
onScroll();
}, lifetime());
_inner->editMessageRequested(
) | rpl::start_with_next([=](auto fullId) {

View File

@ -155,7 +155,10 @@ ScheduledWidget::ScheduledWidget(
static_cast<ListDelegate*>(this)));
_scroll->move(0, _topBar->height());
_scroll->show();
connect(_scroll, &Ui::ScrollArea::scrolled, [=] { onScroll(); });
_scroll->scrolls(
) | rpl::start_with_next([=] {
onScroll();
}, lifetime());
_inner->editMessageRequested(
) | rpl::start_with_next([=](auto fullId) {

View File

@ -48,11 +48,10 @@ Widget::Widget(
_inner->moveToLeft(0, 0, _scroll->width());
connect(
_scroll,
&Ui::ScrollArea::scrolled,
this,
&InlineBots::Layout::Widget::onScroll);
_scroll->scrolls(
) | rpl::start_with_next([=] {
onScroll();
}, lifetime());
_inner->inlineRowsCleared(
) | rpl::start_with_next([=] {

@ -1 +1 @@
Subproject commit a827d9436e9ca258dfdfb9b67ef1ad917c13c5b5
Subproject commit 7182fad08a004b86697af27c971c16bb12c8b421