Implement a QSharedDataPointer-like method for ensuring that caps and miniobjects are writable when needed.
The trick is to get the pointer to the underlying object using an object() method that has a const and
a non-const version. The non-const one calls makeWritable() internally, which makes a copy of the
object if needed, so any non-const method trying to access the underlying object is guaranteed that
it is writable. This is very similar to Qt's implicit sharing mechanism and what QSharedDataPointer does.
18 files changed: