summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmclipboard.cpp
diff options
authorDavid Skoland <david.skoland@qt.io>2021-12-06 13:43:34 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2022-12-20 18:13:47 +0000
commit4b1229e5235412062a5240410ec49e358019507c (patch)
treea7610c8f717f11e9a24ed6099b0455d2772cd07d /src/plugins/platforms/wasm/qwasmclipboard.cpp
parentaf0f13b46053254c7b2416a1f71a95d141247600 (diff)
Set WASM platform default to synchronous window event handling
Based on existing code, it appears that it's always preferred in wasm to use synchronous delivery (<QWindowSystemInterface::SynchronousDelivery>), however, we can simply define this as the default mode of operation, which will make these unnecessary. Change-Id: Ia4c78593333e314f91efb266268917317794e2f5 Pick-to: 6.5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmclipboard.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmclipboard.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/wasm/qwasmclipboard.cpp b/src/plugins/platforms/wasm/qwasmclipboard.cpp
index 1ef2e2a984b..d6343e9f6bc 100644
--- a/src/plugins/platforms/wasm/qwasmclipboard.cpp
+++ b/src/plugins/platforms/wasm/qwasmclipboard.cpp
@@ -51,7 +51,7 @@ static void qClipboardCutTo(val event)
{
if (!QWasmIntegration::get()->getWasmClipboard()->hasClipboardApi()) {
// Send synthetic Ctrl+X to make the app cut data to Qt's clipboard
- QWindowSystemInterface::handleKeyEvent<QWindowSystemInterface::SynchronousDelivery>(
+ QWindowSystemInterface::handleKeyEvent(
0, QEvent::KeyPress, Qt::Key_C, Qt::ControlModifier, "X");
}
@@ -62,7 +62,7 @@ static void qClipboardCopyTo(val event)
{
if (!QWasmIntegration::get()->getWasmClipboard()->hasClipboardApi()) {
// Send synthetic Ctrl+C to make the app copy data to Qt's clipboard
- QWindowSystemInterface::handleKeyEvent<QWindowSystemInterface::SynchronousDelivery>(
+ QWindowSystemInterface::handleKeyEvent(
0, QEvent::KeyPress, Qt::Key_C, Qt::ControlModifier, "C");
}
commonCopyEvent(event);
@@ -74,7 +74,7 @@ static void qWasmClipboardPaste(QMimeData *mData)
QWasmIntegration::get()->clipboard()->
QPlatformClipboard::setMimeData(mData, QClipboard::Clipboard);
- QWindowSystemInterface::handleKeyEvent<QWindowSystemInterface::SynchronousDelivery>(
+ QWindowSystemInterface::handleKeyEvent(
0, QEvent::KeyPress, Qt::Key_V, Qt::ControlModifier, "V");
}
close