From 1fd4c75f1b4ce35f68b4396d6d6f7aa971a2c8ec Mon Sep 17 00:00:00 2001 From: Jim Zhou Date: Sun, 7 Jun 2026 02:08:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E4=BF=9D=20WASM=20=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=20QtPlugin=20=E7=9A=84=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- devel/701.md | 6 ++++++ src/Mogan/Research/research.cpp | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 devel/701.md diff --git a/devel/701.md b/devel/701.md new file mode 100644 index 0000000000..09338b7a5d --- /dev/null +++ b/devel/701.md @@ -0,0 +1,6 @@ +# [701] 确保 WASM 构建下的 QtPlugin 的加载 +## What +添加了 Q_IMPORT_PLUGIN 宏,以确保 WASM 构建下的 QtPlugin 的加载 + +## Why +否则 WASM 构建由于找不到 QtPlugin 无法启动 diff --git a/src/Mogan/Research/research.cpp b/src/Mogan/Research/research.cpp index 2745d94bdc..a14a55bd02 100644 --- a/src/Mogan/Research/research.cpp +++ b/src/Mogan/Research/research.cpp @@ -66,6 +66,10 @@ static QTMCoreApplication* qtmcoreapp= NULL; bool show_startup_login_dialog (); #endif +#ifdef Q_OS_WASM +#include +Q_IMPORT_PLUGIN (QWasmIntegrationPlugin) +#endif /****************************************************************************** * Main program ******************************************************************************/