On quarta-feira, 20 de junho de 2012 06.42.52, Philippe wrote: > In Qt 5 in git, I have seen changes to this implementation. Mainly, in > Qt 4.8, it was stated that "QWeakPointer serves as a replacement to > QPointer". This is no longer the case and this is mentionned as > deprecated (qsharedpointer.cpp). > > QWeakPointer was quoted in 4.8 as "more efficient than QPointer, so it > should be preferred in all new code.". > > I use it a lot without trouble. So I would like to know why this (apparent) > regression? > > Question for Thiago I guess...
Yes, I need to blog about this (I have a draft actually). In Qt5, QPointer and QWeakPointer are equally efficient. However, we've split the usages: - QPointer when you want to use to track QObjects, just like original Qt 4.0 - QWeakPointer when you want to track a QSharedPointer The QWeakPointer constructor that takes a QObject is deprecated. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center Intel Sweden AB - Registration Number: 556189-6027 Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest