diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2021-07-08 16:27:52 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2021-07-13 19:58:08 +0200 |
commit | 09d1196281ccd03dac55781ac91f6c4eb7bb4de9 (patch) | |
tree | b2c21360c48a8a2c513efa8fd3a91aae1359e531 /src/gui/doc/snippets/code | |
parent | 08e4d2db084f6abbf1840ffb694b15bd215ad069 (diff) | |
download | qtbase-09d1196281ccd03dac55781ac91f6c4eb7bb4de9.tar.gz |
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/code')
-rw-r--r-- | src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp index 4be214ad64..6ba5bde2e0 100644 --- a/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp +++ b/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp @@ -78,8 +78,8 @@ QKeySequence(Qt::CTRL + Qt::Key_X, Qt::CTRL + Qt::Key_C); // deprecated void Wrapper::wrapper() { //! [2] QMenu *file = new QMenu(this); -file->addAction(tr("&Open..."), this, SLOT(open()), - QKeySequence(tr("Ctrl+O", "File|Open"))); +file->addAction(tr("&Open..."), QKeySequence(tr("Ctrl+O", "File|Open")), + this, SLOT(open())); //! [2] } // Wrapper::wrapper |