QCustom3DVolume: fix GCC -Wnrvo warning
In these functions, the code returned a temporary except for the last
one, which is a named variable; returning a temporary means we get RVO,
but the last object not being a temporary means that some compliers
won't enable RVO, and of course no NRVO. Fix the issue by wrapping the
last object in an IILE (Immediately Invoked Lambda Expression), which
should let compilers use NRVO.
Pick-to: 6.11 6.10 6.8 6.5
Change-Id: I3b94d5037e18a62a33256de455872b7147acb5ed
Reviewed-by: Marc Mutz <marc.mutz@qt.io>