summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/textdocument-printing
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-printing
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-printing')
-rw-r--r--src/gui/doc/snippets/textdocument-printing/mainwindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/doc/snippets/textdocument-printing/mainwindow.cpp b/src/gui/doc/snippets/textdocument-printing/mainwindow.cpp
index bccbef178e..60d94a99ba 100644
--- a/src/gui/doc/snippets/textdocument-printing/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-printing/mainwindow.cpp
@@ -60,8 +60,8 @@ MainWindow::MainWindow()
{
QMenu *fileMenu = new QMenu(tr("&File"));
- fileMenu->addAction(tr("&Open..."), this, SLOT(openFile()),
- QKeySequence(tr("Ctrl+O", "File|Open")));
+ fileMenu->addAction(tr("&Open..."), QKeySequence(tr("Ctrl+O", "File|Open"))
+ this, SLOT(openFile()));
printAction = fileMenu->addAction(tr("&Print..."), this, SLOT(printFile()));
printAction->setEnabled(false);
@@ -69,8 +69,8 @@ MainWindow::MainWindow()
pdfPrintAction = fileMenu->addAction(tr("Print as P&DF..."), this, SLOT(printPdf()));
pdfPrintAction->setEnabled(false);
- 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()));
menuBar()->addMenu(fileMenu);