phonon5 and the descriptors

Matěj Laitl matej at laitl.cz
Tue Oct 8 11:15:28 BST 2013


On 8. 10. 2013 Harald Sitter wrote:
> I am looking for some input regarding the future of objectdescriptions
> in phonon5.
> 
> tldr: should objects describing a property/setting of phonon objects
> such as Subtitle/AudioOutputDevice/AudioChannel be QObjects; if not,
> should they be QSharedData considering they are comprised of
> implicitly shared qt objects (e.g. qstring) and do not ever get
> changed after creation.

I'd be most happy if these were plain old data (making them QObjects comes 
with a couple of restrictions, for example thread affinity etc.), perhaps with 
*private and hidden* implicit sharing, i.e.:

class ObjectDescription {
    (...)

    private:
        class ObjectDescriptionPrivate;

        QSharedDataPointer<ObjectDescriptionPrivate> d;
}

I think this approach is in the best align with expectations of most folks 
developing with Qt. If there are no mutator methods, QSharedDataPointer 
becomes equal to QExplicitlySharedDataPointer, but still I'd prefer the 
former: I've found it somewhat uncomfortable to work with shared data that 
doesn't automatically detach on mutator methods.

These are however in no way strong opinions.

	Matěj
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


More information about the kde-multimedia mailing list