* \brief Make the specified name unique among my children by incrementing a trailing number. */
| 1134 | * \brief Make the specified name unique among my children by incrementing a trailing number. |
| 1135 | */ |
| 1136 | QString 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 |