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/widgets | |
parent | 08e4d2db084f6abbf1840ffb694b15bd215ad069 (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/widgets')
-rw-r--r-- | src/widgets/CMakeLists.txt | 10 | ||||
-rw-r--r-- | src/widgets/widgets/qmenu.cpp | 147 | ||||
-rw-r--r-- | src/widgets/widgets/qmenu.h | 89 | ||||
-rw-r--r-- | src/widgets/widgets/qtoolbar.cpp | 111 | ||||
-rw-r--r-- | src/widgets/widgets/qtoolbar.h | 49 | ||||
-rw-r--r-- | src/widgets/widgets/qtwidgets_widgets_removed_functions_in_6_3.cpp | 102 |
6 files changed, 176 insertions, 332 deletions
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt index be84ec8e1f..324a26d07d 100644 --- a/src/widgets/CMakeLists.txt +++ b/src/widgets/CMakeLists.txt @@ -47,6 +47,7 @@ qt_internal_add_module(Widgets widgets/qabstractscrollarea.cpp widgets/qabstractscrollarea.h widgets/qabstractscrollarea_p.h widgets/qfocusframe.cpp widgets/qfocusframe.h widgets/qframe.cpp widgets/qframe.h widgets/qframe_p.h + widgets/qtwidgets_widgets_removed_functions_in_6_3.cpp widgets/qwidgetanimator.cpp widgets/qwidgetanimator_p.h DEFINES QT_NO_USING_NAMESPACE @@ -237,6 +238,15 @@ set(qstyle_resource_files "styles/images/viewlist-32.png" ) +set(widgets_no_pch_sources + widgets/qtwidgets_widgets_removed_functions_in_6_3.cpp +) + +foreach(src ${widgets_no_pch_sources}) + qt_update_ignore_pch_source(Widgets ${src}) +endforeach() + + qt_internal_add_resource(Widgets "qstyle" PREFIX "/qt-project.org/styles/commonstyle" diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 282cbe420f..9612e11c01 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -1757,162 +1757,75 @@ QMenu::~QMenu() hideTearOffMenu(); } +#if QT_DEPRECATED_SINCE(6, 4) /*! - This convenience function creates a new action with \a text. - The function adds the newly created action to the menu's - list of actions, and returns it. + \fn QAction *QMenu::addAction(const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut) + \obsolete - QMenu takes ownership of the returned QAction. - - \sa QWidget::addAction() -*/ -QAction *QMenu::addAction(const QString &text) -{ - QAction *ret = new QAction(text, this); - addAction(ret); - return ret; -} - -/*! - \overload - - This convenience function creates a new action with an \a icon - and some \a text. The function adds the newly created action to - the menu's list of actions, and returns it. - - QMenu takes ownership of the returned QAction. - - \sa QWidget::addAction() -*/ -QAction *QMenu::addAction(const QIcon &icon, const QString &text) -{ - QAction *ret = new QAction(icon, text, this); - addAction(ret); - return ret; -} - -/*! - \overload - - This convenience function creates a new action with the text \a - text and an optional shortcut \a shortcut. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a receiver's \a member slot. The function adds the newly created - action to the menu's list of actions and returns it. - - QMenu takes ownership of the returned QAction. - - \sa QWidget::addAction() + Use \c{QWidget::addAction(text, shortcut, receiver, member)} instead. */ -QAction *QMenu::addAction(const QString &text, const QObject *receiver, const char* member #if QT_CONFIG(shortcut) - , const QKeySequence &shortcut -#endif - ) +QAction *QMenu::addAction(const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut) { - QAction *action = new QAction(text, this); -#if QT_CONFIG(shortcut) - action->setShortcut(shortcut); -#endif - QObject::connect(action, SIGNAL(triggered(bool)), receiver, member); - addAction(action); - return action; + return QWidget::addAction(text, shortcut, receiver, member); } +#endif -/*!\fn template<typename Functor> QAction *QMenu::addAction(const QString &text, Functor functor, const QKeySequence &shortcut = 0) +/*! + \fn template<typename Functor> QAction *QMenu::addAction(const QString &text, Functor functor, const QKeySequence &shortcut) \since 5.6 + \obsolete - \overload - - This convenience function creates a new action with the text \a - text and an optional shortcut \a shortcut. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a functor. The function adds the newly created - action to the menu's list of actions and returns it. - - QMenu takes ownership of the returned QAction. + Use QWidget::addAction(text, shortcut, functor) instead. */ -/*!\fn template<typename Functor> QAction *QMenu::addAction(const QString &text, const QObject *context, Functor functor, const QKeySequence &shortcut) +/*! + \fn template<typename Functor> QAction *QMenu::addAction(const QString &text, const QObject *context, Functor functor, const QKeySequence &shortcut) \since 5.6 + \obsolete - \overload - - This convenience function creates a new action with the text \a - text and an optional shortcut \a shortcut. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a functor. The functor can be a pointer to a member function of - the \a context object. The newly created action is added to the - menu's list of actions and a pointer to it is returned. - - If the \a context object is destroyed, the functor will not be called. - - QMenu takes ownership of the returned QAction. + Use QWidget::addAction(text, shortcut, context, functor) instead. */ -/*!\fn template<typename Functor> QAction *QMenu::addAction(const QIcon &icon, const QString &text, Functor functor, const QKeySequence &shortcut = 0) +/*! + \fn template<typename Functor> QAction *QMenu::addAction(const QIcon &icon, const QString &text, Functor functor, const QKeySequence &shortcut) \since 5.6 + \obsolete - \overload - - This convenience function creates a new action with an \a icon - and some \a text and an optional shortcut \a shortcut. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a functor. The function adds the newly created - action to the menu's list of actions and returns it. - - QMenu takes ownership of the returned QAction. + Use QWidget::addAction(icon, text, shortcut, functor) instead. */ -/*!\fn template<typename Functor> QAction *QMenu::addAction(const QIcon &icon, const QString &text, const QObject *context, Functor functor, const QKeySequence &shortcut) +/*! + \fn template<typename Functor> QAction *QMenu::addAction(const QIcon &icon, const QString &text, const QObject *context, Functor functor, const QKeySequence &shortcut) \since 5.6 + \obsolete - \overload - - This convenience function creates a new action with an \a icon - and some \a text and an optional shortcut \a shortcut. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a functor. The \a functor can be a pointer to a member function - of the \a context object. The newly created action is added to the - menu's list of actions and a pointer to it is returned. - - If \a context is destroyed, the functor will not be called. - - QMenu takes ownership of the returned QAction. + Use QWidget::addAction(icon, text, shortcut, context, functor) instead. */ /*! - \overload + \fn QAction *QMenu::addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut) - This convenience function creates a new action with an \a icon and - some \a text and an optional shortcut \a shortcut. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a member slot of the \a receiver object. The function adds the - newly created action to the menu's list of actions, and returns it. + \obsolete - QMenu takes ownership of the returned QAction. - - \sa QWidget::addAction() + Use QWidget::addAction(icon, text, shortcut, receiver, member) instead. */ -QAction *QMenu::addAction(const QIcon &icon, const QString &text, const QObject *receiver, - const char* member #if QT_CONFIG(shortcut) - , const QKeySequence &shortcut -#endif - ) +QAction *QMenu::addAction(const QIcon &icon, const QString &text, const QObject *receiver, + const char* member, const QKeySequence &shortcut) { QAction *action = new QAction(icon, text, this); -#if QT_CONFIG(shortcut) action->setShortcut(shortcut); -#endif QObject::connect(action, SIGNAL(triggered(bool)), receiver, member); addAction(action); return action; } +#endif +#endif // QT_DEPRECATED_SINCE(6, 4) /*! This convenience function adds \a menu as a submenu to this menu. diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h index f7348529e2..73058c165c 100644 --- a/src/widgets/widgets/qmenu.h +++ b/src/widgets/widgets/qmenu.h @@ -76,96 +76,71 @@ public: ~QMenu(); using QWidget::addAction; +#ifdef QT_BUILD_FUNCTIONS_REMOVED_IN_6_3 QAction *addAction(const QString &text); QAction *addAction(const QIcon &icon, const QString &text); - - QAction *addAction(const QString &text, const QObject *receiver, const char* member -#if QT_CONFIG(shortcut) - , const QKeySequence &shortcut = {} +#if !QT_CONFIG(shortcut) + QAction *addAction(const QString &text, const QObject *receiver, const char* member); + QAction *addAction(const QIcon &icon, const QString &text, + const QObject *receiver, const char* member); #endif - ); - QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member -#if QT_CONFIG(shortcut) - , const QKeySequence &shortcut = {} #endif - ); + +#if QT_CONFIG(shortcut) +#if QT_DEPRECATED_SINCE(6, 4) + QT_DEPRECATED_VERSION_X_6_4("Use addAction(text, shortcut, receiver, member) instead.") + QAction *addAction(const QString &text, const QObject *receiver, const char* member, + const QKeySequence &shortcut); + QT_DEPRECATED_VERSION_X_6_4("Use addAction(icon, text, shortcut, receiver, member) instead.") + QAction *addAction(const QIcon &icon, const QString &text, + const QObject *receiver, const char* member, + const QKeySequence &shortcut); #ifdef Q_CLANG_QDOC template<typename Functor> - QAction *addAction(const QString &text, Functor functor, const QKeySequence &shortcut = 0); + QAction *addAction(const QString &text, Functor functor, const QKeySequence &shortcut); template<typename Functor> - QAction *addAction(const QString &text, const QObject *context, Functor functor, const QKeySequence &shortcut = 0); + QAction *addAction(const QString &text, const QObject *context, Functor functor, const QKeySequence &shortcut); template<typename Functor> - QAction *addAction(const QIcon &icon, const QString &text, Functor functor, const QKeySequence &shortcut = 0); + QAction *addAction(const QIcon &icon, const QString &text, Functor functor, const QKeySequence &shortcut); template<typename Functor> - QAction *addAction(const QIcon &icon, const QString &text, const QObject *context, Functor functor, const QKeySequence &shortcut = 0); + QAction *addAction(const QIcon &icon, const QString &text, const QObject *context, Functor functor, const QKeySequence &shortcut); #else // addAction(QString): Connect to a QObject slot / functor or function pointer (with context) template<class Obj, typename Func1> inline typename std::enable_if<!std::is_same<const char*, Func1>::value && QtPrivate::IsPointerToTypeDerivedFromQObject<Obj*>::Value, QAction *>::type - addAction(const QString &text, const Obj *object, Func1 slot -#if QT_CONFIG(shortcut) - , const QKeySequence &shortcut = {} -#endif - ) + addAction(const QString &text, const Obj *object, Func1 slot, + const QKeySequence &shortcut) { - QAction *result = addAction(text); -#if QT_CONFIG(shortcut) - result->setShortcut(shortcut); -#endif - connect(result, &QAction::triggered, object, std::move(slot)); - return result; + return addAction(text, shortcut, object, slot); } // addAction(QString): Connect to a functor or function pointer (without context) template <typename Func1> - inline QAction *addAction(const QString &text, Func1 slot -#if QT_CONFIG(shortcut) - , const QKeySequence &shortcut = {} -#endif - ) + inline QAction *addAction(const QString &text, Func1 slot, const QKeySequence &shortcut) { - QAction *result = addAction(text); -#if QT_CONFIG(shortcut) - result->setShortcut(shortcut); -#endif - connect(result, &QAction::triggered, std::move(slot)); - return result; + return addAction(text, shortcut, slot); } // addAction(QIcon, QString): Connect to a QObject slot / functor or function pointer (with context) template<class Obj, typename Func1> inline typename std::enable_if<!std::is_same<const char*, Func1>::value && QtPrivate::IsPointerToTypeDerivedFromQObject<Obj*>::Value, QAction *>::type - addAction(const QIcon &actionIcon, const QString &text, const Obj *object, Func1 slot -#if QT_CONFIG(shortcut) - , const QKeySequence &shortcut = {} -#endif - ) + addAction(const QIcon &actionIcon, const QString &text, const Obj *object, Func1 slot, + const QKeySequence &shortcut) { - QAction *result = addAction(actionIcon, text); -#if QT_CONFIG(shortcut) - result->setShortcut(shortcut); -#endif - connect(result, &QAction::triggered, object, std::move(slot)); - return result; + return addAction(actionIcon, text, shortcut, object, slot); } // addAction(QIcon, QString): Connect to a functor or function pointer (without context) template <typename Func1> - inline QAction *addAction(const QIcon &actionIcon, const QString &text, Func1 slot -#if QT_CONFIG(shortcut) - , const QKeySequence &shortcut = {} -#endif - ) + inline QAction *addAction(const QIcon &actionIcon, const QString &text, Func1 slot, + const QKeySequence &shortcut) { - QAction *result = addAction(actionIcon, text); -#if QT_CONFIG(shortcut) - result->setShortcut(shortcut); -#endif - connect(result, &QAction::triggered, std::move(slot)); - return result; + return addAction(actionIcon, text, shortcut, slot); } #endif // !Q_CLANG_QDOC +#endif // QT_DEPRECATED_SINCE(6, 4) +#endif // QT_CONFIG(shortcut) QAction *addMenu(QMenu *menu); QMenu *addMenu(const QString &title); diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp index e69c08a251..169fbf5de8 100644 --- a/src/widgets/widgets/qtoolbar.cpp +++ b/src/widgets/widgets/qtoolbar.cpp @@ -737,117 +737,6 @@ void QToolBar::clear() } /*! - Creates a new action with the given \a text. This action is added to - the end of the toolbar. -*/ -QAction *QToolBar::addAction(const QString &text) -{ - QAction *action = new QAction(text, this); - addAction(action); - return action; -} - -/*! - \overload - - Creates a new action with the given \a icon and \a text. This - action is added to the end of the toolbar. -*/ -QAction *QToolBar::addAction(const QIcon &icon, const QString &text) -{ - QAction *action = new QAction(icon, text, this); - addAction(action); - return action; -} - -/*! - \overload - - Creates a new action with the given \a text. This action is added to - the end of the toolbar. The action's \l{QAction::triggered()}{triggered()} - signal is connected to \a member in \a receiver. -*/ -QAction *QToolBar::addAction(const QString &text, - const QObject *receiver, const char* member) -{ - QAction *action = new QAction(text, this); - QObject::connect(action, SIGNAL(triggered(bool)), receiver, member); - addAction(action); - return action; -} - -/*! - \overload - - Creates a new action with the given \a icon and \a text. This - action is added to the end of the toolbar. The action's - \l{QAction::triggered()}{triggered()} signal is connected to \a - member in \a receiver. -*/ -QAction *QToolBar::addAction(const QIcon &icon, const QString &text, - const QObject *receiver, const char* member) -{ - QAction *action = new QAction(icon, text, this); - QObject::connect(action, SIGNAL(triggered(bool)), receiver, member); - addAction(action); - return action; -} - -/*!\fn template<typename Functor> QAction *QToolBar::addAction(const QString &text, Functor functor) - - \since 5.6 - - \overload - - Creates a new action with the given \a text. This action is added to - the end of the toolbar. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a functor. -*/ - -/*!\fn template<typename Functor> QAction *QToolBar::addAction(const QString &text, const QObject *context, Functor functor) - - \since 5.6 - - \overload - - Creates a new action with the given \a text. This action is added - to the end of the toolbar. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a functor. The \a functor can be a pointer to a member function - in the \a context object. - - If the \a context object is destroyed, the \a functor will not be called. -*/ - -/*!\fn template<typename Functor> QAction *QToolBar::addAction(const QIcon &icon, const QString &text, Functor functor) - - \since 5.6 - - \overload - - Creates a new action with the given \a icon and \a text. This - action is added to the end of the toolbar. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a functor. -*/ - -/*!\fn template<typename Functor> QAction *QToolBar::addAction(const QIcon &icon, const QString &text, const QObject *context, Functor functor) - - \since 5.6 - - \overload - - Creates a new action with the given \a icon and \a text. This - action is added to the end of the toolbar. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a functor. The \a functor can be a pointer to a member function - of the \a context object. - - If the \a context object is destroyed, the \a functor will not be called. -*/ - -/*! Adds a separator to the end of the toolbar. \sa insertSeparator() diff --git a/src/widgets/widgets/qtoolbar.h b/src/widgets/widgets/qtoolbar.h index 54dfd51071..caca716d2e 100644 --- a/src/widgets/widgets/qtoolbar.h +++ b/src/widgets/widgets/qtoolbar.h @@ -90,58 +90,13 @@ public: void clear(); using QWidget::addAction; +#ifdef QT_BUILD_FUNCTIONS_REMOVED_IN_6_3 QAction *addAction(const QString &text); QAction *addAction(const QIcon &icon, const QString &text); QAction *addAction(const QString &text, const QObject *receiver, const char* member); QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member); -#ifdef Q_CLANG_QDOC - template<typename Functor> - QAction *addAction(const QString &text, Functor functor); - template<typename Functor> - QAction *addAction(const QString &text, const QObject *context, Functor functor); - template<typename Functor> - QAction *addAction(const QIcon &icon, const QString &text, Functor functor); - template<typename Functor> - QAction *addAction(const QIcon &icon, const QString &text, const QObject *context, Functor functor); -#else - // addAction(QString): Connect to a QObject slot / functor or function pointer (with context) - template<class Obj, typename Func1> - inline typename std::enable_if<!std::is_same<const char*, Func1>::value - && QtPrivate::IsPointerToTypeDerivedFromQObject<Obj*>::Value, QAction *>::type - addAction(const QString &text, const Obj *object, Func1 slot) - { - QAction *result = addAction(text); - connect(result, &QAction::triggered, object, std::move(slot)); - return result; - } - // addAction(QString): Connect to a functor or function pointer (without context) - template <typename Func1> - inline QAction *addAction(const QString &text, Func1 slot) - { - QAction *result = addAction(text); - connect(result, &QAction::triggered, slot); - return result; - } - // addAction(QString): Connect to a QObject slot / functor or function pointer (with context) - template<class Obj, typename Func1> - inline typename std::enable_if<!std::is_same<const char*, Func1>::value - && QtPrivate::IsPointerToTypeDerivedFromQObject<Obj*>::Value, QAction *>::type - addAction(const QIcon &actionIcon, const QString &text, const Obj *object, Func1 slot) - { - QAction *result = addAction(actionIcon, text); - connect(result, &QAction::triggered, object, std::move(slot)); - return result; - } - // addAction(QIcon, QString): Connect to a functor or function pointer (without context) - template <typename Func1> - inline QAction *addAction(const QIcon &actionIcon, const QString &text, Func1 slot) - { - QAction *result = addAction(actionIcon, text); - connect(result, &QAction::triggered, slot); - return result; - } -#endif // !Q_CLANG_QDOC +#endif QAction *addSeparator(); QAction *insertSeparator(QAction *before); diff --git a/src/widgets/widgets/qtwidgets_widgets_removed_functions_in_6_3.cpp b/src/widgets/widgets/qtwidgets_widgets_removed_functions_in_6_3.cpp new file mode 100644 index 0000000000..535aec8ce4 --- /dev/null +++ b/src/widgets/widgets/qtwidgets_widgets_removed_functions_in_6_3.cpp @@ -0,0 +1,102 @@ +/**************************************************************************** +** +** Copyright (C) 2021 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com> +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#define QT_BUILD_FUNCTIONS_REMOVED_IN_6_3 + +#include "qglobal.h" + +QT_USE_NAMESPACE + +#if QT_DEPRECATED_SINCE(6, 3) + +#include "qmenu.h" + +QAction *QMenu::addAction(const QString &text) +{ + return QWidget::addAction(text); +} + +QAction *QMenu::addAction(const QIcon &icon, const QString &text) +{ + return QWidget::addAction(icon, text); +} + +#if !QT_CONFIG(shortcut) +// the overloads taking QKeySequence as a trailing argument are deprecated, not removed, +// so remained in qmenu.cpp +QAction *QMenu::addAction(const QString &text, const QObject *receiver, const char* member) +{ + return QWidget::addAction(text, receiver, member); +} + +QAction *QMenu::addAction(const QIcon &icon, const QString &text, + const QObject *receiver, const char* member) +{ + return QWidget::addAction(icon, text, receiver, member); +} +#endif + +#include "qtoolbar.h" + +QAction *QToolBar::addAction(const QString &text) +{ + return QWidget::addAction(text); +} + +QAction *QToolBar::addAction(const QIcon &icon, const QString &text) +{ + return QWidget::addAction(icon, text); +} + +QAction *QToolBar::addAction(const QString &text, + const QObject *receiver, const char* member) +{ + return QWidget::addAction(text, receiver, member); +} + +QAction *QToolBar::addAction(const QIcon &icon, const QString &text, + const QObject *receiver, const char* member) +{ + return QWidget::addAction(icon, text, receiver, member); +} + +// #include <qotherheader.h> +// // implement removed functions from qotherheader.h + +#endif // QT_DEPRECATED_SINCE(6, 3) |