| 12225 | } |
| 12226 | |
| 12227 | QCPItemPosition::~QCPItemPosition() |
| 12228 | { |
| 12229 | // unregister as parent at children: |
| 12230 | // Note: this is done in ~QCPItemAnchor again, but it's important QCPItemPosition does it itself, because only then |
| 12231 | // the setParentAnchor(0) call the correct QCPItemPosition::pixelPosition function instead of QCPItemAnchor::pixelPosition |
| 12232 | foreach (QCPItemPosition *child, mChildrenX.values()) |
| 12233 | { |
| 12234 | if (child->parentAnchorX() == this) |
| 12235 | child->setParentAnchorX(nullptr); // this acts back on this anchor and child removes itself from mChildrenX |
| 12236 | } |
| 12237 | foreach (QCPItemPosition *child, mChildrenY.values()) |
| 12238 | { |
| 12239 | if (child->parentAnchorY() == this) |
| 12240 | child->setParentAnchorY(nullptr); // this acts back on this anchor and child removes itself from mChildrenY |
| 12241 | } |
| 12242 | // unregister as child in parent: |
| 12243 | if (mParentAnchorX) |
| 12244 | mParentAnchorX->removeChildX(this); |
| 12245 | if (mParentAnchorY) |
| 12246 | mParentAnchorY->removeChildY(this); |
| 12247 | } |
| 12248 | |
| 12249 | /* can't make this a header inline function, because QPointer breaks with forward declared types, see QTBUG-29588 */ |
| 12250 | QCPAxisRect *QCPItemPosition::axisRect() const |
nothing calls this directly
no test coverage detected