1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

Port away from old QContextMenuEvent constructor

GIT_SILENT

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2023-12-17 02:46:46 +01:00
parent 71e37d7985
commit 6cc870be1d
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B

View File

@ -1242,10 +1242,11 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
return;
const QPoint pos = event->pos();
const QPoint globalPos = event->globalPos();
const QContextMenuEvent::Reason reason = event->reason();
QTimer::singleShot(0, this, [this, pos, reason]() {
QContextMenuEvent ev(reason, pos);
QTimer::singleShot(0, this, [this, pos, globalPos, reason]() {
QContextMenuEvent ev(reason, pos, globalPos);
_contextMenuEvent(&ev);
});
}