[Development] QHash iteration vs std::unordered_map

Samuel Gaist samuel.gaist at edeltech.ch
Sun Apr 16 21:48:26 CEST 2017


> On 16 Apr 2017, at 17:53, Thiago Macieira <thiago.macieira at intel.com> wrote:
> 
> Em domingo, 16 de abril de 2017, às 08:05:21 PDT, Mark Gaiser escreveu:
>> That again makes me wonder, why did Qt diverge from that?
> 
> We didn't diverge. We never had that. The Qt style predates the Standard
> Library having relevance in Qt. When the first QHash-like class was added, it
> was just like that.
> 
> Also remember that at the time, you wouldn't think of a Standard Library
> associative container as such. It was just a sequential container that held a
> std::pair, with some convenience functions for searching the first of the pair.
> Returning a pair was a consequence of that. I don't know if it was intentional
> thinking, or it just happened.
> 
>> And... if Qt plans to change it in Qt6?
> 
> No, cannot due to source compatibility. Ever.
> 
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
> 
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
> 

Hi,

Just in case, there’s a work in progress at

https://codereview.qt-project.org/#/c/151511/

to add these "missing" iterators to QHash and QMap.

Cheers,
Samuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.qt-project.org/pipermail/development/attachments/20170416/fde02af5/attachment.sig>


More information about the Development mailing list