forked from qt-creator/qt-creator
Always pass Core::Id by value.
Currently we pass in some places by value, elsewhere by const ref and for some weird reason also by const value in a lot of places. The latter is particularly annoying, as it is also used in interfaces and therefore forces all implementors to do the same, since leaving the "const" off is causing compiler warnings with MSVC. Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -4484,7 +4484,7 @@ void BaseTextEditorWidget::dragEnterEvent(QDragEnterEvent *e)
|
||||
QPlainTextEdit::dragEnterEvent(e);
|
||||
}
|
||||
|
||||
static void appendMenuActionsFromContext(QMenu *menu, const Core::Id menuContextId)
|
||||
static void appendMenuActionsFromContext(QMenu *menu, Core::Id menuContextId)
|
||||
{
|
||||
Core::ActionContainer *mcontext = Core::ActionManager::actionContainer(menuContextId);
|
||||
QMenu *contextMenu = mcontext->menu();
|
||||
@@ -4493,7 +4493,7 @@ static void appendMenuActionsFromContext(QMenu *menu, const Core::Id menuContext
|
||||
menu->addAction(action);
|
||||
}
|
||||
|
||||
void BaseTextEditorWidget::showDefaultContextMenu(QContextMenuEvent *e, const Core::Id menuContextId)
|
||||
void BaseTextEditorWidget::showDefaultContextMenu(QContextMenuEvent *e, Core::Id menuContextId)
|
||||
{
|
||||
QMenu menu;
|
||||
appendMenuActionsFromContext(&menu, menuContextId);
|
||||
|
||||
Reference in New Issue
Block a user