[Development] Question about QCoreApplicationData::*_libpaths
marc.mutz at kdab.com
Thu Jan 21 08:00:39 CET 2016
On Thursday 21 January 2016 05:24:35 Kevin Kofler wrote:
> 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.
So how would you have designed it, then?
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
KDAB - The Qt Experts
More information about the Development