From e8ebd45c465fd41f301ea9a1d98718ef526f68f9 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..fdd5a328f 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"));