On Fri, Jan 9, 2015 at 7:07 PM, Thiago Macieira <thiago.macie...@intel.com> wrote:
> On Friday 09 January 2015 17:42:02 Brad Pepers wrote: > > So it seems like even though I'm getting a const reference using > operator > > [] on the QList, it's actually making a deep copy of the data as if I was > > using the non-const version. > > "I'm getting a const reference using operator[]" is the wrong part. > > You're getting a non-const reference using that operator. > > Why is that? QList can return a const & with the [] operator [1]. The documantation even says it's the same as .at(). [1] http://doc.qt.io/qt-5/qlist.html#operator-5b-5d-2
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest