Skip to content

Commit

Permalink
refactor(tabwidget): Use different overload of addAction
Browse files Browse the repository at this point in the history
The old ordering is deprecated and a new overload with different
ordering of arguments is provided.
  • Loading branch information
Vekhir committed Aug 14, 2024
1 parent e9abc43 commit b2e854b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/web/simplebrowser/tabwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit b2e854b

Please sign in to comment.