[Fix] Qt 6 build fix

This commit is contained in:
Eric Kotato 2022-09-11 06:30:40 +03:00
parent 1ab39257cb
commit 31bfa9506c
4 changed files with 5 additions and 5 deletions

View file

@ -531,7 +531,7 @@ void EditCaptionBox::emojiFilterForGeometry(not_null<QEvent*> event) {
void EditCaptionBox::updateEmojiPanelGeometry() {
const auto parent = _emojiPanel->parentWidget();
const auto global = _emojiToggle->mapToGlobal({ 0, 0 });
const auto global = _emojiToggle->mapToGlobal(QPoint());
const auto local = parent->mapFromGlobal(global);
_emojiPanel->moveBottomRight(
local.y(),

View file

@ -970,8 +970,8 @@ void Content::setupContent(
const auto selectedCoords = [=] {
const auto coords = [=](Rows *rows, int index) {
const auto result = rows->rowScrollRequest(index);
const auto shift = rows->mapToGlobal({ 0, 0 }).y()
- mapToGlobal({ 0, 0 }).y();
const auto shift = rows->mapToGlobal(QPoint()).y()
- mapToGlobal(QPoint()).y();
return Ui::ScrollToRequest(
result.ymin + shift,
result.ymax + shift);

View file

@ -768,7 +768,7 @@ void SendFilesBox::emojiFilterForGeometry(not_null<QEvent*> event) {
void SendFilesBox::updateEmojiPanelGeometry() {
const auto parent = _emojiPanel->parentWidget();
const auto global = _emojiToggle->mapToGlobal({ 0, 0 });
const auto global = _emojiToggle->mapToGlobal(QPoint());
const auto local = parent->mapFromGlobal(global);
_emojiPanel->moveBottomRight(
local.y(),

View file

@ -121,7 +121,7 @@ object_ptr<Ui::RpWidget> InnerWidget::setupContent(
? request.ymin
: mapFromGlobal(_members->mapToGlobal({ 0, request.ymin })).y();
auto max = (request.ymin < 0)
? mapFromGlobal(_members->mapToGlobal({ 0, 0 })).y()
? mapFromGlobal(_members->mapToGlobal(QPoint())).y()
: (request.ymax < 0)
? request.ymax
: mapFromGlobal(_members->mapToGlobal({ 0, request.ymax })).y();