MCPcopy Create free account
hub / github.com/KDE/kdevelop / createActionsForMainWindow

Method createActionsForMainWindow

plugins/clang/clangsupport.cpp:273–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273void ClangSupport::createActionsForMainWindow (Sublime::MainWindow* /*window*/, QString& _xmlFile, KActionCollection& actions)
274{
275 _xmlFile = xmlFile();
276
277 QAction* renameDeclarationAction = actions.addAction(QStringLiteral("code_rename_declaration"));
278 renameDeclarationAction->setText( i18nc("@action", "Rename Declaration") );
279 renameDeclarationAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-rename")));
280 actions.setDefaultShortcut(renameDeclarationAction, Qt::CTRL | Qt::SHIFT | Qt::Key_R);
281 connect(renameDeclarationAction, &QAction::triggered,
282 m_refactoring, &ClangRefactoring::executeRenameAction);
283
284 QAction* moveIntoSourceAction = actions.addAction(QStringLiteral("code_move_definition"));
285 moveIntoSourceAction->setText(i18nc("@action", "Move into Source"));
286 actions.setDefaultShortcut(moveIntoSourceAction, Qt::CTRL | Qt::ALT | Qt::Key_S);
287 connect(moveIntoSourceAction, &QAction::triggered,
288 m_refactoring, &ClangRefactoring::executeMoveIntoSourceAction);
289}
290
291KDevelop::ContextMenuExtension ClangSupport::contextMenuExtension(KDevelop::Context* context, QWidget* parent)
292{

Callers

nothing calls this directly

Calls 3

setIconMethod · 0.80
addActionMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected