XdgToplevelIcon: Reserve instead of resize list


resize() changes the size of the list, reserve() changes the capacity.

If we resize and then append we end up with too many items, some of
which are default-constructed (invalid) sizes.

Later we use the invalid size to get a pixmap, which will be empty.

In QWaylandShmBuffer we then try to mmap the empty pixmap, which fails
and we return early, never calling init() and setting mBuffer.

In QWaylandXdgToplevelIconV1 we then pass this null buffer
to add_buffer, which results in a protocol error

Fixes: QTBUG-132727
Pick-to: 6.9
Change-Id: I8f164c43423726367157fa9ce2e3af7a6fd3219c
Reviewed-by: David Redondo <qt@david-redondo.de>
commite251ef8a5a74a7e82f14fd1b34ab306de28382a6
parentf1d087d1a2aa556103aece926d256a618e863f1c
authorNicolas Fella <nicolas.fella@kde.org>
committerNicolas Fella <nicolas.fella@kde.org>
commit timeSun, 12 Jan 2025 12:15:23 +0100