[Development] Question about QCoreApplicationData::*_libpaths

Kevin Kofler kevin.kofler at chello.at
Thu Jan 21 05:24:35 CET 2016


Marc Mutz wrote:

> On Wednesday 20 January 2016 22:50:43 Kevin Kofler wrote:
>> All these are horrible and error-prone hacks that have obvious lifetime
>> issues. You are complaining about Qt containers because the detaching can
>> invalidate iterators. Well, the lifetime issues you introduce with the
>> above proposed solutions are much worse! And a caching mutable member
>> also destroys thread-safety (in addition to the obvious lifetime issue
>> that the next call surprisingly invalidates your existing reference).
> 
> One word: QModelIndex.

And that class is the source of innumerable bugs. The fact that one Qt class 
has such broken semantics is no excuse for putting them everywhere.

        Kevin Kofler




More information about the Development mailing list