forked from qt-creator/qt-creator
BaseTextEditor: Make internally used function static
Change-Id: I365e4c56b45dda205caa009e7733579d40bca9d0 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -4190,6 +4190,15 @@ void BaseTextEditorWidget::dragEnterEvent(QDragEnterEvent *e)
|
|||||||
QPlainTextEdit::dragEnterEvent(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)
|
void BaseTextEditorWidget::showDefaultContextMenu(QContextMenuEvent *e, const Core::Id menuContextId)
|
||||||
{
|
{
|
||||||
QMenu menu;
|
QMenu menu;
|
||||||
@@ -6027,15 +6036,6 @@ QColor BaseTextEditorWidget::replacementPenColor(int blockNumber) const
|
|||||||
return QColor();
|
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)
|
void BaseTextEditorWidget::appendStandardContextMenuActions(QMenu *menu)
|
||||||
{
|
{
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
|
|||||||
@@ -150,7 +150,6 @@ public:
|
|||||||
|
|
||||||
void print(QPrinter *);
|
void print(QPrinter *);
|
||||||
|
|
||||||
void appendMenuActionsFromContext(QMenu *menu, Core::Id menuContextId);
|
|
||||||
void appendStandardContextMenuActions(QMenu *menu);
|
void appendStandardContextMenuActions(QMenu *menu);
|
||||||
|
|
||||||
// Works only in conjunction with a syntax highlighter that puts
|
// Works only in conjunction with a syntax highlighter that puts
|
||||||
|
|||||||
Reference in New Issue
Block a user