[Development] Adding Q_GADGET here and there
Olivier Goffart
olivier at woboq.com
Sun Apr 16 20:13:26 CEST 2017
On Sonntag, 16. April 2017 16:41:27 CEST Alberto Mardegan wrote:
> Hi all,
> I'm about to use QMimeType in my application, and I'd found it useful
> if it were a Q_GADGET. Can I just go on and submit a patch to add that,
> or are there some cons (a small increase on the library size, I assume)?
>
> In general: is it a good idea to add Q_GADGET to non QObject classes
> within the Qt source code?
Q_GADGET's overhead is basically the cost of the QMetaObject. So it's there,
but it's quite small.
If there is an use for a class to be a Q_GADGET, I think it should be added.
--
Olivier
Woboq - Qt services and support - https://woboq.com - https://code.woboq.org
More information about the Development
mailing list