From 09d1196281ccd03dac55781ac91f6c4eb7bb4de9 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 8 Jul 2021 16:27:52 +0200 Subject: 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 --- src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui/doc/snippets/code') 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 4be214ad64f..6ba5bde2e02 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 -- cgit v1.2.3