1// Copyright (C) 2021 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#define QT_WIDGETS_BUILD_REMOVED_API
5
6#include "qtwidgetsglobal.h"
7
8QT_USE_NAMESPACE
9
10#if QT_WIDGETS_REMOVED_SINCE(6, 3)
11
12#if QT_CONFIG(menu)
13#include "qmenu.h"
14
15QAction *QMenu::addAction(const QString &text)
16{
17 return QWidget::addAction(text);
18}
19
20QAction *QMenu::addAction(const QIcon &icon, const QString &text)
21{
22 return QWidget::addAction(icon, text);
23}
24#endif
25
26#if !QT_CONFIG(shortcut)
27// the overloads taking QKeySequence as a trailing argument are deprecated, not removed,
28// so remained in qmenu.cpp
29QAction *QMenu::addAction(const QString &text, const QObject *receiver, const char* member)
30{
31 return QWidget::addAction(text, receiver, member);
32}
33
34QAction *QMenu::addAction(const QIcon &icon, const QString &text,
35 const QObject *receiver, const char* member)
36{
37 return QWidget::addAction(icon, text, receiver, member);
38}
39#endif
40
41#if QT_CONFIG(toolbar)
42#include "qtoolbar.h"
43
44QAction *QToolBar::addAction(const QString &text)
45{
46 return QWidget::addAction(text);
47}
48
49QAction *QToolBar::addAction(const QIcon &icon, const QString &text)
50{
51 return QWidget::addAction(icon, text);
52}
53
54QAction *QToolBar::addAction(const QString &text,
55 const QObject *receiver, const char* member)
56{
57 return QWidget::addAction(text, receiver, member);
58}
59
60QAction *QToolBar::addAction(const QIcon &icon, const QString &text,
61 const QObject *receiver, const char* member)
62{
63 return QWidget::addAction(icon, text, receiver, member);
64}
65#endif
66
67#if QT_CONFIG(menubar)
68#include "qmenubar.h"
69
70QAction *QMenuBar::addAction(const QString &text)
71{
72 return QWidget::addAction(text);
73}
74
75QAction *QMenuBar::addAction(const QString &text, const QObject *receiver, const char* member)
76{
77 return QWidget::addAction(text, receiver, member);
78}
79#endif
80
81// #include <qotherheader.h>
82// // implement removed functions from qotherheader.h
83
84#endif // QT_WIDGETS_REMOVED_SINCE(6, 3)
85

source code of qtbase/src/widgets/compat/removed_api.cpp