>
>  I'm wondering if there isn't a reentrancy issue in QMap.
>
Almost. QMap works as it should if you only call const members, but as
Konstantin said operator[] on a non-const  instance is a mutating function.

I am pretty sure your problems will go away if you declare operator() as
const. Then, the const version of operator[] will be called.

This is an unfortunate side effect of Qt's implicit sharing of container
classes. There is a tiny note here about a similar problem:
http://doc.qt.io/qt-5/containers.html#implicit-sharing-iterator-problem
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to