| 251 | } |
| 252 | |
| 253 | void BasicRefactoring::executeRenameAction() |
| 254 | { |
| 255 | auto* action = qobject_cast<QAction*>(sender()); |
| 256 | if (action) { |
| 257 | IndexedDeclaration decl = action->data().value<IndexedDeclaration>(); |
| 258 | |
| 259 | { |
| 260 | DUChainReadLocker lock; |
| 261 | |
| 262 | if (!decl.isValid()) |
| 263 | decl = declarationUnderCursor(); |
| 264 | |
| 265 | if (!decl.isValid()) |
| 266 | return; |
| 267 | } |
| 268 | |
| 269 | startInteractiveRename(decl); |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | BasicRefactoring::NameAndCollector BasicRefactoring::newNameForDeclaration( |
| 274 | const KDevelop::DeclarationPointer& declaration) |