Commit 4d99f6e9 authored by Eike Ziller's avatar Eike Ziller

BaseTextEditor: Make internally used function static

Change-Id: I365e4c56b45dda205caa009e7733579d40bca9d0
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 2a2837a6
......@@ -4190,6 +4190,15 @@ void BaseTextEditorWidget::dragEnterEvent(QDragEnterEvent *e)
QPlainTextEdit::dragEnterEvent(e);
}
static void appendMenuActionsFromContext(QMenu *menu, const Core::Id menuContextId)
{
Core::ActionContainer *mcontext = Core::ActionManager::actionContainer(menuContextId);
QMenu *contextMenu = mcontext->menu();
foreach (QAction *action, contextMenu->actions())
menu->addAction(action);
}
void BaseTextEditorWidget::showDefaultContextMenu(QContextMenuEvent *e, const Core::Id menuContextId)
{
QMenu menu;
......@@ -6027,15 +6036,6 @@ QColor BaseTextEditorWidget::replacementPenColor(int blockNumber) const
return QColor();
}
void BaseTextEditorWidget::appendMenuActionsFromContext(QMenu *menu, const Core::Id menuContextId)
{
Core::ActionContainer *mcontext = Core::ActionManager::actionContainer(menuContextId);
QMenu *contextMenu = mcontext->menu();
foreach (QAction *action, contextMenu->actions())
menu->addAction(action);
}
void BaseTextEditorWidget::appendStandardContextMenuActions(QMenu *menu)
{
menu->addSeparator();
......
......@@ -150,7 +150,6 @@ public:
void print(QPrinter *);
void appendMenuActionsFromContext(QMenu *menu, Core::Id menuContextId);
void appendStandardContextMenuActions(QMenu *menu);
// Works only in conjunction with a syntax highlighter that puts
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment