2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Use install_base_filter for lib_base.

This commit is contained in:
John Preston
2019-09-19 12:28:36 +03:00
parent a6b96662c4
commit f677b116f9
14 changed files with 43 additions and 124 deletions

View File

@@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/special_buttons.h"
#include "ui/ui_utility.h"
#include "lang/lang_keys.h"
#include "core/event_filter.h"
#include "base/event_filter.h"
#include "base/qt_signal_producer.h"
#include "history/history.h"
#include "chat_helpers/tabbed_panel.h"
@@ -228,11 +228,11 @@ void ComposeControls::initTabbedSelector() {
const auto selector = _window->tabbedSelector();
const auto wrap = _wrap.get();
Core::InstallEventFilter(wrap, selector, [=](not_null<QEvent*> e) {
base::install_event_filter(wrap, selector, [=](not_null<QEvent*> e) {
if (_tabbedPanel && e->type() == QEvent::ParentChange) {
setTabbedPanel(nullptr);
}
return Core::EventFilter::Result::Continue;
return base::EventFilterResult::Continue;
});
selector->emojiChosen(

View File

@@ -27,7 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/send_files_box.h"
#include "window/window_session_controller.h"
#include "window/window_peer_menu.h"
#include "core/event_filter.h"
#include "base/event_filter.h"
#include "core/file_utilities.h"
#include "main/main_session.h"
#include "data/data_session.h"
@@ -551,13 +551,13 @@ void ScheduledWidget::setupScrollDownButton() {
_scrollDown->setClickedCallback([=] {
scrollDownClicked();
});
Core::InstallEventFilter(_scrollDown, [=](not_null<QEvent*> event) {
base::install_event_filter(_scrollDown, [=](not_null<QEvent*> event) {
if (event->type() != QEvent::Wheel) {
return Core::EventFilter::Result::Continue;
return base::EventFilterResult::Continue;
}
return _scroll->viewportEvent(event)
? Core::EventFilter::Result::Cancel
: Core::EventFilter::Result::Continue;
? base::EventFilterResult::Cancel
: base::EventFilterResult::Continue;
});
updateScrollDownVisibility();
}