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>
commitfc4d90f7109b6e608075c81bd99120deb53f42c2
parent7581a1e239ca41af89732172b8f223fd00d1ad46
authorAhmad Samir <a.samirh78@gmail.com>
committerAhmad Samir <a.samirh78@gmail.com>
commit timeWed, 4 Feb 2026 13:13:19 +0200