MCPcopy Create free account
hub / github.com/YACReader/yacreader / rename

Method rename

YACReaderLibrary/yacreader_libraries.cpp:100–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void YACReaderLibraries::rename(const QString &oldName, const QString &newName)
101{
102 auto library = std::find_if(libraries.begin(), libraries.end(), [oldName](const YACReaderLibrary &library) { return library.getName() == oldName; });
103 libraries.erase(library);
104 libraries.append(YACReaderLibrary(newName, library->getPath(), library->getLegacyId(), library->getId()));
105}
106
107int YACReaderLibraries::getId(const QString &name) const
108{

Callers

nothing calls this directly

Calls 5

YACReaderLibraryClass · 0.85
getPathMethod · 0.80
getLegacyIdMethod · 0.80
getNameMethod · 0.45
getIdMethod · 0.45

Tested by

no test coverage detected