[vlc-devel] [PATCH 1/3] qt: use shared pointers in menu items

Rémi Denis-Courmont remi at remlab.net
Mon Mar 18 16:36:40 CET 2019

Le lundi 18 mars 2019, 15:20:14 EET Hugo Beauzée-Luyssen a écrit :
> Hi,
> I like the idea but why using QSharedPointer instead of vlc_shared_data_ptr
> or wrap_cptr?

AFAIU, vlc_shared_data_ptr and the Qt equivalent are meant for, well, shared 
data. Also AFAIU, vlc_shared_data_ptr would not work here since it 
instantiates one type per pair of hold/release functions, and we need one 
single type for all four possible pairs (none, input, aout, vout).

As for wrap_cptr, it seems to me that Qt code uses Qt rather than VLC C++, or 
even ISO C++, helpers, e.g. QString rather than std::string and QMutexLocker 
rather than vlc_mutex_locker.

Rémi Denis-Courmont

More information about the vlc-devel mailing list