tst_qwindowcapturebackend: Replace waitForFrame with consumeFirstFrame


The behavior of waitForFrame works poorly when integrating tests that
check for null-frames at the end of a stream, because it clears all
collected frames up until that point.

Most commonly it is used to wait for the first frame of a stream, so
instead we replace it with 'consumeFirstFrame()' which only returns the
first frame, if we ever got one.

Pick-to: 6.12
Change-Id: I40d12675fe61f6663c66e5ef7131128c8d079645
Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
commit46c66c8b90b00568a6bacfece2302f6f4fc26d9c
parenta0fa50e499f89d491bcc13a53517c81938bb7b35
authorNils Petter Skålerud <nils.petter.skalerud@qt.io>
committerNils Petter Skålerud <nils.petter.skalerud@qt.io>
commit timeTue, 29 Sep 2026 11:04:51 +0000