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>