On 30/05/2019 04.12, d3fault wrote: > On 5/29/19, Mutz, Marc via Development <development@qt-project.org> wrote: >> == QSharedDataPointer / QExplicitlySharedDataPointer == >> >> These are basically Qt-internals, and should never have been public in >> the first place. > > I disagree (unless there's some replacement you forgot to mention?). > Being able to create implicitly shared classes is extremely useful. I > consider implicit sharing and signals/slots, together, to to be one of > Qt's greatest strengths. They allow you to thread safely access/read a > "single" object across multiple threads without even thinking about > threading primitives such as mutex/waitcondition. You can also thread > safely modify/write to that object, by copying/detach()'ing just > before write (CoW). > > I think the reason QSharedDataPointer hasn't seen very much use in > user code is because it's so darn tedious and time consuming to setup.
Not that I'm disagreeing with (the second half of) that, but... https://github.com/Kitware/seal-tk/blob/4e8d6683b35dd0a8acd01b7a7dfcde20696d06b8/sealtk/core/VideoMetaData.cpp#L16 This isn't my only use, just the most recent one... -- Matthew _______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development