The above isn't thread-safe, it isn't even re-entrant, in the same way that iteration using iterators isn't. This is a known issue whenever you hand out references, and it's nothing that violates our const-is-thread-safe promise, otherwise
... which is why we prefer to hand out (implicitly shared) copies rather than references.
static const QMap map = ~~~; // T1 map["x"].size();
Our container classes do hand out references, because containers have to. But in other places we avoid it.
best regards, Ulf _______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development