QArrayManagerFix

Removed a useless line that caused a call to the dtor of the manager resource
upon acquisition.

Change-Id: I94b4344ffb0ad34f5c2050480d7b286b0ac53c2a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Fix AABB calculation

The AABB were wrong and always included the origin, because
we were testing against default constructed QVectors for
calculating the AABB's extent.

Change-Id: I6e9902d6d9c6cb3e987244bfa985db6922c132c3
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Fix torus generation

We need don't have (sides + 1) sides (see the vertex generation below).
This caused all code to access uninitialized values (for the extra element).

Change-Id: I1e26d6e0a2cdef1959a94336a726a7d5df6b2b72
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Fix a dangling pointer

Buffer::data() returns a QByteArray by value, that means
constData() returns a pointer to a QByteArray which gets destroyed
at the end of the statement. Then, using that pointer becomes
extremely dangerous (dangling). Fix it by storing the QByteArray locally.

Change-Id: Iaed2bd344061bec8bff713c2c1fd81773864c7a5
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>