forked from qt-creator/qt-creator
QmlDesigner: Return action by id
Change-Id: Id1d15acf513786789c4ea4deaa84672f17fd889b Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -1515,6 +1515,14 @@ QList<ActionInterface* > DesignerActionManager::designerActions() const
|
||||
});
|
||||
}
|
||||
|
||||
ActionInterface *DesignerActionManager::actionByMenuId(const QByteArray &id)
|
||||
{
|
||||
for (const auto &action : m_designerActions)
|
||||
if (action->menuId() == id)
|
||||
return action.data();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DesignerActionManager::DesignerActionManager(DesignerActionManagerView *designerActionManagerView)
|
||||
: m_designerActionManagerView(designerActionManagerView)
|
||||
{
|
||||
|
@@ -110,6 +110,7 @@ public:
|
||||
QList<QSharedPointer<ActionInterface>> actionsForTargetView(const ActionInterface::TargetView &target);
|
||||
|
||||
QList<ActionInterface* > designerActions() const;
|
||||
ActionInterface *actionByMenuId(const QByteArray &id);
|
||||
|
||||
void createDefaultDesignerActions();
|
||||
void createDefaultAddResourceHandler();
|
||||
|
Reference in New Issue
Block a user