summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmcursor.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-01-28 01:00:09 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2020-01-28 16:02:04 +0100
commit6c3eb39832876a65291546476b92fd94950b1208 (patch)
tree2d551aab7fce80b2ef603f1cfc42bf6f9d0e4411 /src/plugins/platforms/wasm/qwasmcursor.cpp
parentfcd3a20059d0c629d972ba2577694394b438a100 (diff)
parent082faeff9c4c5a5b10d140b391d30305575a898b (diff)
Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmcursor.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmcursor.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcursor.cpp b/src/plugins/platforms/wasm/qwasmcursor.cpp
index c04fa6441a..616456b2fa 100644
--- a/src/plugins/platforms/wasm/qwasmcursor.cpp
+++ b/src/plugins/platforms/wasm/qwasmcursor.cpp
@@ -29,6 +29,7 @@
#include "qwasmcursor.h"
#include "qwasmscreen.h"
+#include "qwasmstring.h"
#include <QtCore/qdebug.h>
#include <QtGui/qwindow.h>
@@ -56,11 +57,11 @@ void QWasmCursor::changeCursor(QCursor *windowCursor, QWindow *window)
htmlCursorName = "auto";
// Set cursor on the canvas
- QByteArray canvasId = QWasmScreen::get(screen)->canvasId().toUtf8();
+ val jsCanvasId = QWasmString::fromQString(QWasmScreen::get(screen)->canvasId());
val document = val::global("document");
- val canvas = document.call<val>("getElementById", val(canvasId.constData()));
+ val canvas = document.call<val>("getElementById", jsCanvasId);
val canvasStyle = canvas["style"];
- canvasStyle.set("cursor", emscripten::val(htmlCursorName.constData()));
+ canvasStyle.set("cursor", val(htmlCursorName.constData()));
}
QByteArray QWasmCursor::cursorShapeToHtml(Qt::CursorShape shape)