wasm: restore windowCursor nullptr check
This check was accidentally removed in commit 783b63ce
.
If the cursor is null, set the default cursor.
Pick-to: 6.5 6.5.0
Change-Id: I894d5e04cd7b49041bd0d3b59fc816a8b7efffe7
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
This commit is contained in:
parent
3602936230
commit
2245a8dbb0
@ -75,11 +75,10 @@ QByteArray cursorShapeToCss(Qt::CursorShape shape)
|
||||
|
||||
void QWasmCursor::changeCursor(QCursor *windowCursor, QWindow *window)
|
||||
{
|
||||
if (!window || !window->handle())
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
static_cast<QWasmWindow *>(window->handle())
|
||||
->setWindowCursor(cursorShapeToCss(windowCursor->shape()));
|
||||
if (QWasmWindow *wasmWindow = static_cast<QWasmWindow *>(window->handle()))
|
||||
wasmWindow->setWindowCursor(windowCursor ? cursorShapeToCss(windowCursor->shape()) : "default");
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
Loading…
Reference in New Issue
Block a user