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

Method newFileName

kdevplatform/language/codegen/basicrefactoring.cpp:113–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113QString BasicRefactoring::newFileName(const QUrl& current, const QString& newName)
114{
115 QPair<QString, QString> nameExtensionPair = splitFileAtExtension(current.fileName());
116 // if current file is lowercased, keep that
117 if (nameExtensionPair.first == nameExtensionPair.first.toLower()) {
118 return newName.toLower() + nameExtensionPair.second;
119 } else {
120 return newName + nameExtensionPair.second;
121 }
122}
123
124DocumentChangeSet::ChangeResult BasicRefactoring::addRenameFileChanges(const QUrl& current,
125 const QString& newName,

Callers 2

descriptionMethod · 0.80
textChangedMethod · 0.80

Calls 2

splitFileAtExtensionFunction · 0.85
fileNameMethod · 0.45

Tested by

no test coverage detected