Skip to content

Introduce initAfterInsert() framework function - #14402

Merged
magnesj merged 1 commit into
devfrom
init-after-insert-14401
Aug 3, 2026
Merged

Introduce initAfterInsert() framework function#14402
magnesj merged 1 commit into
devfrom
init-after-insert-14401

Conversation

@magnesj

@magnesj magnesj commented Jul 29, 2026

Copy link
Copy Markdown
Member

Fixes #14401

Introduce caf::PdmXmlObjectHandle::initAfterInsert() combining the manual resolveReferencesRecursively() + initAfterReadRecursively() pair that must be called after inserting a copied object into the document tree. The function resolves references first so that initAfterRead() overrides can rely on resolved pointer fields, and asserts that the object has a parent field to catch calls made before insertion (the bug class behind #14372).

Intentionally not migrated:

A unit test in cafPdmAdvancedTemplateTest.cpp verifies that initAfterInsert() resolves a nulled pointer field and re-runs initAfterRead() on an inserted copy.

@magnesj
magnesj requested a review from jonjenssen August 3, 2026 06:56
@magnesj magnesj self-assigned this Aug 3, 2026
@magnesj
magnesj merged commit 9ccca3e into dev Aug 3, 2026
21 checks passed
@magnesj
magnesj deleted the init-after-insert-14401 branch August 3, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce initAfterInsert() to combine resolveReferencesRecursively() and initAfterReadRecursively()

2 participants