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

Method shouldRenameUses

kdevplatform/language/codegen/basicrefactoring.cpp:101–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101bool BasicRefactoring::shouldRenameUses(KDevelop::Declaration* declaration) const
102{
103 // Now we know we're editing a declaration, but some declarations we don't offer a rename for
104 // basically that's any declaration that wouldn't be fully renamed just by renaming its uses().
105 if (declaration->internalContext() || declaration->isForwardDeclaration()) {
106 //make an exception for non-class functions
107 if (!declaration->isFunctionDeclaration() || dynamic_cast<ClassFunctionDeclaration*>(declaration))
108 return false;
109 }
110 return true;
111}
112
113QString BasicRefactoring::newFileName(const QUrl& current, const QString& newName)
114{

Callers 1

textChangedMethod · 0.80

Calls 3

internalContextMethod · 0.45
isForwardDeclarationMethod · 0.45
isFunctionDeclarationMethod · 0.45

Tested by

no test coverage detected