diff options
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmcursor.cpp')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmcursor.cpp | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcursor.cpp b/src/plugins/platforms/wasm/qwasmcursor.cpp index c76e527b8e..4b4bb61071 100644 --- a/src/plugins/platforms/wasm/qwasmcursor.cpp +++ b/src/plugins/platforms/wasm/qwasmcursor.cpp @@ -1,12 +1,11 @@ /**************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:COMM$ -** +** $QT_BEGIN_LICENSE:GPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the @@ -15,15 +14,16 @@ ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** -** $QT_END_LICENSE$ -** -** -** -** -** -** -** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** +** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -41,20 +41,24 @@ using namespace emscripten; void QWasmCursor::changeCursor(QCursor *windowCursor, QWindow *window) { - if (!windowCursor || !window) + if (!window) return; QScreen *screen = window->screen(); if (!screen) return; - // Bitmap and custom cursors are not implemented (will fall back to "auto") - if (windowCursor->shape() == Qt::BitmapCursor || windowCursor->shape() >= Qt::CustomCursor) - qWarning() << "QWasmCursor: bitmap and custom cursors are not supported"; + QByteArray htmlCursorName; + if (windowCursor) { + + // Bitmap and custom cursors are not implemented (will fall back to "auto") + if (windowCursor->shape() == Qt::BitmapCursor || windowCursor->shape() >= Qt::CustomCursor) + qWarning() << "QWasmCursor: bitmap and custom cursors are not supported"; - QByteArray htmlCursorName = cursorShapeToHtml(windowCursor->shape()); + htmlCursorName = cursorShapeToHtml(windowCursor->shape()); + } if (htmlCursorName.isEmpty()) - htmlCursorName = "auto"; + htmlCursorName = "default"; // Set cursor on the canvas val canvas = QWasmScreen::get(screen)->canvas(); |