From b2e854b85595e4ed1847105f4b9e85a1c473ce37 Mon Sep 17 00:00:00 2001 From: Vekhir Date: Wed, 14 Aug 2024 21:15:29 +0200 Subject: [PATCH] refactor(tabwidget): Use different overload of addAction The old ordering is deprecated and a new overload with different ordering of arguments is provided. --- src/web/simplebrowser/tabwidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/web/simplebrowser/tabwidget.cpp b/src/web/simplebrowser/tabwidget.cpp index 39b70ac93..1c189eac5 100644 --- a/src/web/simplebrowser/tabwidget.cpp +++ b/src/web/simplebrowser/tabwidget.cpp @@ -120,7 +120,11 @@ void TabWidget::handleCurrentChanged(int index) void TabWidget::handleContextMenuRequested(const QPoint &pos) { QMenu menu; +#if (QT_VERSION >= QT_VERSION_CHECK(6, 3, 0)) + menu.addAction(tr("New &Tab"), QKeySequence::AddTab, this, &TabWidget::createTab); +#else menu.addAction(tr("New &Tab"), this, &TabWidget::createTab, QKeySequence::AddTab); +#endif int index = tabBar()->tabAt(pos); if (index != -1) { QAction *action = menu.addAction(tr("Clone Tab"));