Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit 65c71e0bc63cda38d9ed497e8821bf5f167664aa
- Author: con <qtc-committer@nokia.com>
- Date: Fri Nov 12 13:45:13 2010 +0100
- Fix updating of menus with EA_Hide.
- diff --git a/src/plugins/coreplugin/actionmanager/actioncontainer.cpp b/src/plugins/coreplugin/actionmanager/actioncontainer.cpp
- index 4d39b49..68e73a1 100644
- --- a/src/plugins/coreplugin/actionmanager/actioncontainer.cpp
- +++ b/src/plugins/coreplugin/actionmanager/actioncontainer.cpp
- @@ -150,7 +150,7 @@ using namespace Core::Internal;
- ActionContainerPrivate::ActionContainerPrivate(int id)
- : m_data(0), m_id(id), m_updateRequested(false)
- {
- -
- + scheduleUpdate();
- }
- void ActionContainerPrivate::setEmptyAction(EmptyAction ea)
- @@ -251,6 +251,7 @@ void ActionContainerPrivate::addAction(Command *action, int pos, bool setpos)
- m_posmap.insert(pos, action->id());
- connect(action, SIGNAL(activeStateChanged()), this, SLOT(scheduleUpdate()));
- insertAction(ba, a->action());
- + scheduleUpdate();
- }
- void ActionContainerPrivate::addMenu(ActionContainer *menu, int pos, bool setpos)
- @@ -271,6 +272,7 @@ void ActionContainerPrivate::addMenu(ActionContainer *menu, int pos, bool setpos
- m_subContainers.append(menu);
- m_posmap.insert(pos, menu->id());
- insertMenu(ba, mc->menu());
- + scheduleUpdate();
- }
- QAction *ActionContainerPrivate::beforeAction(int pos, int *prevKey) const
- @@ -418,9 +420,9 @@ bool MenuActionContainer::updateInternal()
- }
- if (hasEmptyAction(EA_Hide))
- - m_menu->setVisible(hasitems);
- + m_menu->menuAction()->setVisible(hasitems);
- else if (hasEmptyAction(EA_Disable))
- - m_menu->setEnabled(hasitems);
- + m_menu->menuAction()->setEnabled(hasitems);
- return hasitems;
- }
- diff --git a/src/plugins/coreplugin/actionmanager/actionmanager.cpp b/src/plugins/coreplugin/actionmanager/actionmanager.cpp
- index 96888ad..c44c659 100644
- --- a/src/plugins/coreplugin/actionmanager/actionmanager.cpp
- +++ b/src/plugins/coreplugin/actionmanager/actionmanager.cpp
- @@ -255,11 +255,6 @@ QList<Command *> ActionManagerPrivate::commands() const
- return result;
- }
- -QList<ActionContainerPrivate *> ActionManagerPrivate::containers() const
- -{
- - return m_idContainerMap.values();
- -}
- -
- bool ActionManagerPrivate::hasContext(int context) const
- {
- return m_context.contains(context);
- diff --git a/src/plugins/coreplugin/actionmanager/actionmanager_p.h b/src/plugins/coreplugin/actionmanager/actionmanager_p.h
- index 4d3e3c9..39cb3f6 100644
- --- a/src/plugins/coreplugin/actionmanager/actionmanager_p.h
- +++ b/src/plugins/coreplugin/actionmanager/actionmanager_p.h
- @@ -72,7 +72,6 @@ public:
- QList<int> defaultGroups() const;
- QList<Command *> commands() const;
- - QList<ActionContainerPrivate *> containers() const;
- bool hasContext(int context) const;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement