On Tuesday, 24 March 2015 11:28:16 CET, Jan Kundrát wrote:
> end() returns an interator, not a const_iterator. Obtaining an interator 
> (not a const_iterator) from a Qt container calls detach(), which means that 
> your QHash gets copied.

And one important correction because I wasn't very clear at first -- this 
copying only happens if the QHash was shared, i.e. if there were at least 
two instances of QHash which happened to share the underlying data.

Is your QHash shared? Be careful, this might not always be obvious and 
readily visible.

Cheers,
Jan

-- 
Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to