* \brief Insert the given Aspect at a specific position in my list of children.without any checks and without putting this step onto the undo-stack */
| 573 | * \brief Insert the given Aspect at a specific position in my list of children.without any checks and without putting this step onto the undo-stack |
| 574 | */ |
| 575 | void AbstractAspect::insertChildBeforeFast(AbstractAspect* child, AbstractAspect* before) { |
| 576 | connect(child, &AbstractAspect::selected, this, &AbstractAspect::childSelected); |
| 577 | connect(child, &AbstractAspect::deselected, this, &AbstractAspect::childDeselected); |
| 578 | |
| 579 | int index = d->indexOfChild(before); |
| 580 | if (index == -1) |
| 581 | index = d->m_children.count(); |
| 582 | |
| 583 | Q_EMIT childAspectAboutToBeAdded(this, nullptr, child); |
| 584 | d->insertChild(index, child); |
| 585 | child->finalizeAdd(); |
| 586 | Q_EMIT childAspectAdded(child); |
| 587 | } |
| 588 | |
| 589 | /** |
| 590 | * \brief Remove the given Aspect from my list of children. |
nothing calls this directly
no test coverage detected