Specify QPoint in QWidget::mapToGlobal(QPoint &pos)

There's now both QPoint and QPointF overloads

Reference:
- https://doc.qt.io/qt-6/qwidget.html#mapToGlobal
This commit is contained in:
zneix 2021-07-31 22:47:00 +02:00
parent 2a8daaea05
commit d6450a8f78
No known key found for this signature in database
GPG key ID: 911916E0523B22F6

View file

@ -540,7 +540,7 @@ void SplitInput::showCompletionPopup(const QString &text, bool emoteCompletion)
else // autocomplete usernames else // autocomplete usernames
popup->updateUsers(text, this->split_->getChannel()); popup->updateUsers(text, this->split_->getChannel());
auto pos = this->mapToGlobal({0, 0}) - QPoint(0, popup->height()) + auto pos = this->mapToGlobal(QPoint{0, 0}) - QPoint(0, popup->height()) +
QPoint((this->width() - popup->width()) / 2, 0); QPoint((this->width() - popup->width()) / 2, 0);
popup->move(pos); popup->move(pos);