From 5f5f9f33be4f21cdf925482898042bb792d53a78 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Sun, 19 Feb 2012 16:52:24 +0000 Subject: Merge overloads. Fixes a Qt 5 TODO Change-Id: Ide3159a5b979bd8e8a1edefff7fccb98dbe9a78e Reviewed-by: Pierre Rossi --- src/widgets/widgets/qmenu.cpp | 25 ------------------------- src/widgets/widgets/qmenu.h | 4 +--- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index e8415e3a9c..e619cdf4fc 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -2082,31 +2082,6 @@ QAction *QMenu::exec(QList actions, const QPoint &pos, QAction *at, QW return menu.exec(pos, at); } -/*! - \overload - - Executes a menu synchronously. - - The menu's actions are specified by the list of \a actions. The menu - will pop up so that the specified action, \a at, appears at global - position \a pos. If \a at is not specified then the menu appears - at position \a pos. - - The function returns the triggered QAction in either the popup - menu or one of its submenus, or 0 if no item was triggered - (normally because the user pressed Esc). - - This is equivalent to: - \snippet doc/src/snippets/code/src_gui_widgets_qmenu.cpp 6 - - \sa popup(), QWidget::mapToGlobal() -*/ -QAction *QMenu::exec(QList actions, const QPoint &pos, QAction *at) -{ - // ### Qt 5: merge - return exec(actions, pos, at, 0); -} - /*! \reimp */ diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h index 182b0bc2b8..1fa7195170 100644 --- a/src/widgets/widgets/qmenu.h +++ b/src/widgets/widgets/qmenu.h @@ -116,9 +116,7 @@ public: QAction *exec(); QAction *exec(const QPoint &pos, QAction *at=0); - // ### Qt 5: merge - static QAction *exec(QList actions, const QPoint &pos, QAction *at=0); - static QAction *exec(QList actions, const QPoint &pos, QAction *at, QWidget *parent); + static QAction *exec(QList actions, const QPoint &pos, QAction *at=0, QWidget *parent=0); QSize sizeHint() const; -- cgit v1.2.3