diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-06-10 12:32:24 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-06-11 15:35:18 +0000 |
commit | f3d4ee7ebbbe1ffeacbdc4f2042caaae23dd2964 (patch) | |
tree | 84473773d6ed8b3b974a2bb36b6e326c6273a2d5 | |
parent | ee7ec6ec26a89255d8753e9a94d3954f2d55443d (diff) | |
download | qtwebengine-f3d4ee7ebbbe1ffeacbdc4f2042caaae23dd2964.tar.gz |
Fix simplebrowser build with Qt 6.2v6.4.0-beta1
This is a partial revert of 83e5b3c3e19deedfcad0dcb8116b3e6c931b8f6c
Change-Id: I79e814075415585b4d4a3b04a92b3ad84d2dfa53
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
(cherry picked from commit 4ffc841ba7e9de4be8b2a2eed95cff5278a708ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | examples/webenginewidgets/simplebrowser/browserwindow.cpp | 8 | ||||
-rw-r--r-- | examples/webenginewidgets/simplebrowser/tabwidget.cpp | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/examples/webenginewidgets/simplebrowser/browserwindow.cpp b/examples/webenginewidgets/simplebrowser/browserwindow.cpp index b9d746de7..a3c7bec48 100644 --- a/examples/webenginewidgets/simplebrowser/browserwindow.cpp +++ b/examples/webenginewidgets/simplebrowser/browserwindow.cpp @@ -153,7 +153,11 @@ QSize BrowserWindow::sizeHint() const QMenu *BrowserWindow::createFileMenu(TabWidget *tabWidget) { QMenu *fileMenu = new QMenu(tr("&File")); +#if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0) fileMenu->addAction(tr("&New Window"), QKeySequence::New, this, &BrowserWindow::handleNewWindowTriggered); +#else + fileMenu->addAction(tr("&New Window"), this, &BrowserWindow::handleNewWindowTriggered, QKeySequence::New); +#endif fileMenu->addAction(tr("New &Incognito Window"), this, &BrowserWindow::handleNewIncognitoWindowTriggered); QAction *newTabAction = new QAction(tr("New &Tab"), this); @@ -164,7 +168,11 @@ QMenu *BrowserWindow::createFileMenu(TabWidget *tabWidget) }); fileMenu->addAction(newTabAction); +#if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0) fileMenu->addAction(tr("&Open File..."), QKeySequence::Open, this, &BrowserWindow::handleFileOpenTriggered); +#else + fileMenu->addAction(tr("&Open File..."), this, &BrowserWindow::handleFileOpenTriggered, QKeySequence::Open); +#endif fileMenu->addSeparator(); QAction *closeTabAction = new QAction(tr("&Close Tab"), this); diff --git a/examples/webenginewidgets/simplebrowser/tabwidget.cpp b/examples/webenginewidgets/simplebrowser/tabwidget.cpp index 268ad9a34..044e456b7 100644 --- a/examples/webenginewidgets/simplebrowser/tabwidget.cpp +++ b/examples/webenginewidgets/simplebrowser/tabwidget.cpp @@ -115,7 +115,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")); |