[Development] Qt6 source changes
giuseppe.dangelo at kdab.com
Fri Nov 2 23:25:07 CET 2018
Il 02/11/18 20:13, Иван Комиссаров ha scritto:
> Nice idea to have such a method. But is't it a pessimization to return a vector which certainly allocates?
> Don't throw rocks in me, what about passing std::function that can enumerate roles?
As I said, we can bikeshed on the signature. How do you return N
role/variant pairs? Taking an output iterator as parameter isn't Qt
style, so we need a container.
Note that in a item delegate (on widgets) the container can be allocated
just once, and then simply re-filled with data (without reallocations)
when painting each index.
Mind to elaborate on the std::function idea?
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4007 bytes
Desc: Firma crittografica S/MIME
More information about the Development