Skip to content

Let JobController take ownership of the configuration

Nicolas Fella requested to merge work/configowner into master

Previously the configuration was parented to the AlternativesModel. This was introduced in 262ffe80 which was a behavioral change given that previously ownership was transferred to the caller and therefore arguably should not have happend.

Binding the Configuration lifetime to the AlternativesModel lifetime is undesirable since one AlternativesModel can be used to create several jobs.

Binding it to the controller, which is designed to be used for a single job makes more sense.

To avoid another behavioural change a new method is introduced. To indicate that ownership is transferred to the caller a unique_ptr is returned.

Edited by Nicolas Fella

Merge request reports

Loading