| 96 | Qt::ItemFlags flags; |
| 97 | |
| 98 | ProjectBaseItem::RenameStatus renameBaseItem(ProjectBaseItem* item, const QString& newName) |
| 99 | { |
| 100 | if (item->parent()) { |
| 101 | const auto siblings = item->parent()->children(); |
| 102 | for (ProjectBaseItem* sibling : siblings) { |
| 103 | if (sibling->text() == newName) { |
| 104 | return ProjectBaseItem::ExistingItemSameName; |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | item->setText( newName ); |
| 109 | return ProjectBaseItem::RenameOk; |
| 110 | } |
| 111 | |
| 112 | ProjectBaseItem::RenameStatus renameFileOrFolder(ProjectBaseItem* item, const QString& newName) |
| 113 | { |