diff options
| author | Mitch Curtis <mitch.curtis@qt.io> | 2025-10-16 14:00:07 +0800 |
|---|---|---|
| committer | Mitch Curtis <mitch.curtis@qt.io> | 2025-10-23 09:45:51 +0800 |
| commit | cc9ce866093a31067d2fa37f483c59414692a840 (patch) | |
| tree | a87d4b4c78b12ddc7434c457de6ff60cd5dd48e9 /tests/auto/quick/doc/how-tos/how-to-cpp-enum-js/script.mjs | |
| parent | baaab2e4687e093c7fdd3e5049002b7d7e70ac18 (diff) | |
Doc: use registerModule in "Use a C++ enum in JavaScript" how-to
This is apparently better than using globalObject.
registerModule was introduced in
3464655f5e2adaa1aed8925a9a54b8fb5f238f31.
Pick-to: 6.8 6.10
Change-Id: Ic664e65d7e5f8d65004112802e8f19f4f790bb7d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/quick/doc/how-tos/how-to-cpp-enum-js/script.mjs')
| -rw-r--r-- | tests/auto/quick/doc/how-tos/how-to-cpp-enum-js/script.mjs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/quick/doc/how-tos/how-to-cpp-enum-js/script.mjs b/tests/auto/quick/doc/how-tos/how-to-cpp-enum-js/script.mjs index a4f929222a..c9d1cffce9 100644 --- a/tests/auto/quick/doc/how-tos/how-to-cpp-enum-js/script.mjs +++ b/tests/auto/quick/doc/how-tos/how-to-cpp-enum-js/script.mjs @@ -1,6 +1,8 @@ // Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +import { Backend } from "MyApp" + //! [file] export function backendStatusUpdate(backendStatus) { if (backendStatus === Backend.Error) { |
