Hide Q<Platform>MenuAction
This will help abstracting the platform specific parts of QMenuBarPrivate in a common interface. Merge-request: 916 Reviewed-by: Thierry Bastian <thierry.bastian@nokia.com> (cherry picked from commit c664954295c0605c73f7e69deb9f6130c5f5fb05)
This commit is contained in:
parent
e84cfbfcfa
commit
69da442904
@ -1639,7 +1639,7 @@ QMenuBarPrivate::QMacMenuBarPrivate::~QMacMenuBarPrivate()
|
||||
}
|
||||
|
||||
void
|
||||
QMenuBarPrivate::QMacMenuBarPrivate::addAction(QAction *a, QMacMenuAction *before)
|
||||
QMenuBarPrivate::QMacMenuBarPrivate::addAction(QAction *a, QAction *before)
|
||||
{
|
||||
if (a->isSeparator() || !menu)
|
||||
return;
|
||||
@ -1649,7 +1649,7 @@ QMenuBarPrivate::QMacMenuBarPrivate::addAction(QAction *a, QMacMenuAction *befor
|
||||
#ifndef QT_MAC_USE_COCOA
|
||||
action->command = qt_mac_menu_static_cmd_id++;
|
||||
#endif
|
||||
addAction(action, before);
|
||||
addAction(action, findAction(before));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -398,12 +398,12 @@ void QMenuPrivate::QSymbianMenuPrivate::rebuild(bool)
|
||||
{
|
||||
}
|
||||
|
||||
void QMenuBarPrivate::QSymbianMenuBarPrivate::addAction(QAction *a, QSymbianMenuAction *before)
|
||||
void QMenuBarPrivate::QSymbianMenuBarPrivate::addAction(QAction *a, QAction *before)
|
||||
{
|
||||
QSymbianMenuAction *action = new QSymbianMenuAction;
|
||||
action->action = a;
|
||||
action->command = qt_symbian_menu_static_cmd_id++;
|
||||
addAction(action, before);
|
||||
addAction(action, findAction(before));
|
||||
}
|
||||
|
||||
void QMenuBarPrivate::QSymbianMenuBarPrivate::addAction(QSymbianMenuAction *action, QSymbianMenuAction *before)
|
||||
|
@ -504,12 +504,12 @@ void QMenuPrivate::QWceMenuPrivate::removeAction(QWceMenuAction *action)
|
||||
rebuild();
|
||||
}
|
||||
|
||||
void QMenuBarPrivate::QWceMenuBarPrivate::addAction(QAction *a, QWceMenuAction *before)
|
||||
void QMenuBarPrivate::QWceMenuBarPrivate::addAction(QAction *a, QAction *before)
|
||||
{
|
||||
QWceMenuAction *action = new QWceMenuAction;
|
||||
action->action = a;
|
||||
action->command = qt_wce_menu_static_cmd_id++;
|
||||
addAction(action, before);
|
||||
addAction(action, findAction(before));
|
||||
}
|
||||
|
||||
void QMenuBarPrivate::QWceMenuBarPrivate::addAction(QWceMenuAction *action, QWceMenuAction *before)
|
||||
|
@ -1287,7 +1287,7 @@ void QMenuBar::actionEvent(QActionEvent *e)
|
||||
if (!nativeMenuBar)
|
||||
return;
|
||||
if(e->type() == QEvent::ActionAdded)
|
||||
nativeMenuBar->addAction(e->action(), nativeMenuBar->findAction(e->before()));
|
||||
nativeMenuBar->addAction(e->action(), e->before());
|
||||
else if(e->type() == QEvent::ActionRemoved)
|
||||
nativeMenuBar->removeAction(e->action());
|
||||
else if(e->type() == QEvent::ActionChanged)
|
||||
|
@ -181,7 +181,7 @@ public:
|
||||
QMacMenuBarPrivate();
|
||||
~QMacMenuBarPrivate();
|
||||
|
||||
void addAction(QAction *, QMacMenuAction* =0);
|
||||
void addAction(QAction *, QAction* =0);
|
||||
void addAction(QMacMenuAction *, QMacMenuAction* =0);
|
||||
void syncAction(QMacMenuAction *);
|
||||
inline void syncAction(QAction *a) { syncAction(findAction(a)); }
|
||||
@ -220,7 +220,7 @@ public:
|
||||
|
||||
QWceMenuBarPrivate(QMenuBarPrivate *menubar);
|
||||
~QWceMenuBarPrivate();
|
||||
void addAction(QAction *, QWceMenuAction* =0);
|
||||
void addAction(QAction *, QAction* =0);
|
||||
void addAction(QWceMenuAction *, QWceMenuAction* =0);
|
||||
void syncAction(QWceMenuAction *);
|
||||
inline void syncAction(QAction *a) { syncAction(findAction(a)); }
|
||||
@ -250,7 +250,7 @@ public:
|
||||
QMenuBarPrivate *d;
|
||||
QSymbianMenuBarPrivate(QMenuBarPrivate *menubar);
|
||||
~QSymbianMenuBarPrivate();
|
||||
void addAction(QAction *, QSymbianMenuAction* =0);
|
||||
void addAction(QAction *, QAction* =0);
|
||||
void addAction(QSymbianMenuAction *, QSymbianMenuAction* =0);
|
||||
void syncAction(QSymbianMenuAction *);
|
||||
inline void syncAction(QAction *a) { syncAction(findAction(a)); }
|
||||
|
Loading…
Reference in New Issue
Block a user