[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-multimedia
Subject:    Re: phonon5 and the descriptors
From:       Matěj Laitl <matej () laitl ! cz>
Date:       2013-10-08 10:15:28
Message-ID: 2229920.IXa7hWecqk () edgy
[Download RAW message or body]

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@kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic