| 271 | } |
| 272 | |
| 273 | void 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 | |
| 291 | KDevelop::ContextMenuExtension ClangSupport::contextMenuExtension(KDevelop::Context* context, QWidget* parent) |
| 292 | { |