websockets example: fix namespaced builds


The forward declaration of class QWebSocket in websocketiodevice.h
sits at global scope, so declares a second QWebSocket in namespaced
builds, and makes the following uses of the name ambiguous.

Fix by replacing the forward declaration with an include. This is
preferable over QT_FORWARD_DECLARE_CLASS, because ~WebSocketIoDevice()
is inline, and QPointer<QWebSocket>::~QPointer() kinda needs to know
its payload in-size.

The alternative would be to use QT_FORWARD_DECLARE_CLASS and make the
destructor out-of-line. This solution is simpler.

Amends b8a71125f038b5a52d034b804d32ecddd9e19286.

Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I8c8dc2a772497c499a708ddb84e7ae6bc56c92bc
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
commite5a461ac978433a284cc8f4309fdfa326a34a2c0
parentff9d2ee33820a6058186b4d3a55d34515b6d652f
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeWed, 2 Aug 2023 16:08:57 +0200