Skip to content

Make HolidayRegion copyable/movable

Volker Krause requested to merge work/holidayregion-value-type into master

This allows to use HolidayRegion as a value type, rather than requiring allocating them on the heap when wanting to change regions during runtime. More importantly, this opens the way to make it a Q_GADGET and pass it via QVariant, and thus easily use it from QML directly.

HolidayRegion is immutable after construction, so holding the d pointer in a shared pointer would be enough, however we need one that doesn't need extra space over a void* here to not break ABI. Therefore the choice of QExplicitlySharedDataPointer.

Merge request reports