QEventStorage: fix comment about slicing

QEventStorage<E> will slice if you call store(e) where typeid(e) !=
typeid(E). But if they are the same, no slicing occurs.

So change the code comment from "always slices" to "may slice".

Amends dd264cc9c00e09eb995f1c6f9b1fd651f1d4b2f4.

Pick-to: 6.9
Task-number: QTBUG-99563
Task-number: QTBUG-133321
Change-Id: Ic69d2d3e6b5491c2d3e61d8da131f4bda628fe95
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
Marc Mutz 2025-04-09 07:46:46 +02:00
parent df0885dc6a
commit 5d2164382c

View File

@ -35,7 +35,7 @@ class QPointingDevice;
It is similar to std::optional, but with a more targeted API.
Note that by storing an event in QEventStorage, it is always sliced.
Note that by storing an event in QEventStorage, it may be sliced.
*/
template <typename Event>
class QEventStorage