MCPcopy Create free account
hub / github.com/KDE/labplot / uniqueNameFor

Method uniqueNameFor

src/backend/core/AbstractAspect.cpp:1136–1142  ·  view source on GitHub ↗

* \brief Make the specified name unique among my children by incrementing a trailing number. */

Source from the content-addressed store, hash-verified

1134 * \brief Make the specified name unique among my children by incrementing a trailing number.
1135 */
1136QString AbstractAspect::uniqueNameFor(const QString& name) const {
1137 QStringList names;
1138 for (auto* child : children())
1139 names << child->name();
1140
1141 return uniqueNameFor(name, names);
1142}
1143
1144/*!
1145 * static helper function that makes the string \c name unique and avoids duplicates

Callers 1

setNameMethod · 0.80

Calls 4

appendMethod · 0.80
nameMethod · 0.45
containsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected