summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/textdocument-listitems
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2021-07-08 16:27:52 +0200
committerMarc Mutz <marc.mutz@kdab.com>2021-07-13 19:58:08 +0200
commit09d1196281ccd03dac55781ac91f6c4eb7bb4de9 (patch)
treeb2c21360c48a8a2c513efa8fd3a91aae1359e531 /src/gui/doc/snippets/textdocument-listitems
parent08e4d2db084f6abbf1840ffb694b15bd215ad069 (diff)
QMenu/QToolBar: remove addAction() functions
They're now in QWidget itself. Remove them from the API, but not the ABI. The QToolBar case is straight-forward. QMenu is a bit more complicated: Since QT_CONFIG(shortcut) builds changed the signature of an existing function instead of adding/removing an overload, we have to deal with two cases: In a QT_CONFIG(shortcut) build, these overloads that take a trailing QKeySequence parameter have been deprecated and therefore cannot be removed. In a !QT_CONFIG(shortcut) build, the same functions are 1:1 copies of QWidget functions and can be removed (from the API). [ChangeLog][QtWidgets][QMenu/QToolBar] The addAction() functions have been moved down into QWidget. Change-Id: I49997b3440c137a1d4e3858d1d27d34a191e1eed Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/gui/doc/snippets/textdocument-listitems')
-rw-r--r--src/gui/doc/snippets/textdocument-listitems/mainwindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/doc/snippets/textdocument-listitems/mainwindow.cpp b/src/gui/doc/snippets/textdocument-listitems/mainwindow.cpp
index 5179208f61e..119cf1b5f75 100644
--- a/src/gui/doc/snippets/textdocument-listitems/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-listitems/mainwindow.cpp
@@ -59,8 +59,8 @@ MainWindow::MainWindow()
{
QMenu *fileMenu = new QMenu(tr("&File"));
- fileMenu->addAction(tr("E&xit"), this, SLOT(close()),
- QKeySequence(tr("Ctrl+Q", "File|Exit")));
+ fileMenu->addAction(tr("E&xit"), QKeySequence(tr("Ctrl+Q", "File|Exit")),
+ this, SLOT(close()));
QMenu *actionsMenu = new QMenu(tr("&Actions"));
actionsMenu->addAction(tr("&Highlight List Items"),
@@ -69,8 +69,8 @@ MainWindow::MainWindow()
QMenu *insertMenu = new QMenu(tr("&Insert"));
- insertMenu->addAction(tr("&List"), this, SLOT(insertList()),
- QKeySequence(tr("Ctrl+L", "Insert|List")));
+ insertMenu->addAction(tr("&List"), QKeySequence(tr("Ctrl+L", "Insert|List")),
+ this, SLOT(insertList()));
menuBar()->addMenu(fileMenu);
menuBar()->addMenu(insertMenu);