[Qt-interest] Re : Follow-up "QHash::const_iterator not reentrant?"

BOUCARD Olivier boucard_olivier at yahoo.fr
Mon Aug 22 17:38:31 CEST 2011


Thank you. Effectively it works.

But sorry, it does not explain why this code crash.
Or more precisely, why calling a detach at this point cause a failure?

Olivier.




>________________________________
>De : Andreas Pakulat <apaku at gmx.de>
>À : qt-interest at qt.nokia.com
>Envoyé le : Lundi 22 Août 2011 17h11
>Objet : Re: [Qt-interest] Follow-up "QHash::const_iterator not reentrant?"
>
>On 22.08.11 15:54:56, BOUCARD Olivier wrote:
>> Hi everyone,
>> 
>> I am coming back to you as I found the same problem on a more critical part of my code.
>> I join a small piece of code which reproduce the problem.
>> I really don't know where is the problem, this is probably not a reentrancy problem.
>
>You're mixing non-const with const iterators, thats your problem.
>Replace the begin/end with constBegin/constEnd in receiverworker.cpp and
>the example works fine.
>
>Andreas
>
>_______________________________________________
>Qt-interest mailing list
>Qt-interest at qt.nokia.com
>http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110822/0a152aef/attachment.html 


More information about the Qt-interest-old mailing list