From b575de46781621aa8c68b80c79fd86b125740578 Mon Sep 17 00:00:00 2001 From: FlyAndNotDown Date: Sun, 10 Aug 2025 21:10:21 +0800 Subject: [PATCH 1/4] feat: web project update --- Editor/Web/package.json | 13 +- Editor/Web/src/App.tsx | 6 +- Editor/Web/src/main.tsx | 16 +- Editor/Web/src/pages/project-hub.tsx | 16 +- Editor/Web/src/provider.tsx | 8 +- Editor/Web/src/qwebchannel.js | 455 +++++++++++++++++++++++++++ 6 files changed, 485 insertions(+), 29 deletions(-) create mode 100644 Editor/Web/src/qwebchannel.js diff --git a/Editor/Web/package.json b/Editor/Web/package.json index 19bb9ca2c..560a7c3e6 100644 --- a/Editor/Web/package.json +++ b/Editor/Web/package.json @@ -10,24 +10,25 @@ "preview": "vite preview" }, "dependencies": { + "@heroui/avatar": "^2.2.20", + "@heroui/breadcrumbs": "^2.2.20", "@heroui/button": "^2.2.24", + "@heroui/chip": "^2.2.20", "@heroui/code": "^2.2.18", "@heroui/dropdown": "^2.3.24", + "@heroui/form": "^2.1.24", "@heroui/input": "^2.4.25", - "@heroui/breadcrumbs": "^2.2.20", - "@heroui/avatar": "^2.2.20", "@heroui/kbd": "^2.2.19", "@heroui/link": "^2.2.21", - "@heroui/tabs": "^2.2.21", "@heroui/navbar": "^2.2.22", + "@heroui/react": "^2.8.2", "@heroui/snippet": "^2.2.25", - "@heroui/form": "^2.1.24", "@heroui/switch": "^2.2.22", - "@heroui/chip": "^2.2.20", - "@heroui/user": "^2.2.20", "@heroui/system": "^2.4.20", + "@heroui/tabs": "^2.2.21", "@heroui/theme": "^2.4.20", "@heroui/use-theme": "2.1.10", + "@heroui/user": "^2.2.20", "@react-aria/visually-hidden": "3.8.26", "@react-types/shared": "3.31.0", "@tailwindcss/postcss": "4.1.11", diff --git a/Editor/Web/src/App.tsx b/Editor/Web/src/App.tsx index 73927df6d..62dbe6831 100644 --- a/Editor/Web/src/App.tsx +++ b/Editor/Web/src/App.tsx @@ -1,10 +1,10 @@ -import { Route, Routes } from "react-router-dom"; -import ProjectHubPage from "@/pages/project-hub"; +import { Route, Routes } from 'react-router-dom'; +import ProjectHubPage from '@/pages/project-hub'; function App() { return ( - } path="/project-hub"/> + } path='/project-hub'/> ); } diff --git a/Editor/Web/src/main.tsx b/Editor/Web/src/main.tsx index 506a0df82..2476bdc26 100644 --- a/Editor/Web/src/main.tsx +++ b/Editor/Web/src/main.tsx @@ -1,16 +1,16 @@ -import React from "react"; -import ReactDOM from "react-dom/client"; -import { BrowserRouter } from "react-router-dom"; +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import { BrowserRouter } from 'react-router-dom'; -import App from "./App.tsx"; -import { Provider } from "./provider.tsx"; -import "@/styles/globals.css"; +import App from './App.tsx'; +import { Provider } from './provider.tsx'; +import '@/styles/globals.css'; -ReactDOM.createRoot(document.getElementById("root")!).render( +ReactDOM.createRoot(document.getElementById('root')!).render( -
+
diff --git a/Editor/Web/src/pages/project-hub.tsx b/Editor/Web/src/pages/project-hub.tsx index d1be42cc1..476336e08 100644 --- a/Editor/Web/src/pages/project-hub.tsx +++ b/Editor/Web/src/pages/project-hub.tsx @@ -1,8 +1,8 @@ -import { Tabs, Tab } from "@heroui/tabs"; -import { User } from "@heroui/user"; -import { Form } from "@heroui/form"; -import { Button } from "@heroui/button"; -import { Input } from "@heroui/input"; +import { Tabs, Tab } from '@heroui/tabs'; +import { User } from '@heroui/user'; +import { Form } from '@heroui/form'; +import { Button } from '@heroui/button'; +import { Input } from '@heroui/input'; export default function ProjectHubPage() { return ( @@ -10,10 +10,10 @@ export default function ProjectHubPage() {
diff --git a/Editor/Web/src/provider.tsx b/Editor/Web/src/provider.tsx index f9e6a0478..c28d26d1b 100644 --- a/Editor/Web/src/provider.tsx +++ b/Editor/Web/src/provider.tsx @@ -1,9 +1,9 @@ -import type { NavigateOptions } from "react-router-dom"; +import type { NavigateOptions } from 'react-router-dom'; -import { HeroUIProvider } from "@heroui/system"; -import { useHref, useNavigate } from "react-router-dom"; +import { HeroUIProvider } from '@heroui/system'; +import { useHref, useNavigate } from 'react-router-dom'; -declare module "@react-types/shared" { +declare module '@react-types/shared' { interface RouterConfig { routerOptions: NavigateOptions; } diff --git a/Editor/Web/src/qwebchannel.js b/Editor/Web/src/qwebchannel.js new file mode 100644 index 000000000..56fa66a65 --- /dev/null +++ b/Editor/Web/src/qwebchannel.js @@ -0,0 +1,455 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +"use strict"; + +var QWebChannelMessageTypes = { + signal: 1, + propertyUpdate: 2, + init: 3, + idle: 4, + debug: 5, + invokeMethod: 6, + connectToSignal: 7, + disconnectFromSignal: 8, + setProperty: 9, + response: 10, +}; + +var QWebChannel = function(transport, initCallback, converters) +{ + if (typeof transport !== "object" || typeof transport.send !== "function") { + console.error("The QWebChannel expects a transport object with a send function and onmessage callback property." + + " Given is: transport: " + typeof(transport) + ", transport.send: " + typeof(transport.send)); + return; + } + + var channel = this; + this.transport = transport; + + var converterRegistry = + { + Date : function(response) { + if (typeof response === "string" + && response.match( + /^-?\d+-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d*)?([-+\u2212](\d{2}):(\d{2})|Z)?$/)) { + var date = new Date(response); + if (!isNaN(date)) + return date; + } + return undefined; // Return undefined if current converter is not applicable + } + }; + + this.usedConverters = []; + + this.addConverter = function(converter) + { + if (typeof converter === "string") { + if (converterRegistry.hasOwnProperty(converter)) + this.usedConverters.push(converterRegistry[converter]); + else + console.error("Converter '" + converter + "' not found"); + } else if (typeof converter === "function") { + this.usedConverters.push(converter); + } else { + console.error("Invalid converter object type " + typeof converter); + } + } + + if (Array.isArray(converters)) { + for (const converter of converters) + this.addConverter(converter); + } else if (converters !== undefined) { + this.addConverter(converters); + } + + this.send = function(data) + { + if (typeof(data) !== "string") { + data = JSON.stringify(data); + } + channel.transport.send(data); + } + + this.transport.onmessage = function(message) + { + var data = message.data; + if (typeof data === "string") { + data = JSON.parse(data); + } + switch (data.type) { + case QWebChannelMessageTypes.signal: + channel.handleSignal(data); + break; + case QWebChannelMessageTypes.response: + channel.handleResponse(data); + break; + case QWebChannelMessageTypes.propertyUpdate: + channel.handlePropertyUpdate(data); + break; + default: + console.error("invalid message received:", message.data); + break; + } + } + + this.execCallbacks = {}; + this.execId = 0; + this.exec = function(data, callback) + { + if (!callback) { + // if no callback is given, send directly + channel.send(data); + return; + } + if (channel.execId === Number.MAX_VALUE) { + // wrap + channel.execId = Number.MIN_VALUE; + } + if (data.hasOwnProperty("id")) { + console.error("Cannot exec message with property id: " + JSON.stringify(data)); + return; + } + data.id = channel.execId++; + channel.execCallbacks[data.id] = callback; + channel.send(data); + }; + + this.objects = {}; + + this.handleSignal = function(message) + { + var object = channel.objects[message.object]; + if (object) { + object.signalEmitted(message.signal, message.args); + } else { + console.warn("Unhandled signal: " + message.object + "::" + message.signal); + } + } + + this.handleResponse = function(message) + { + if (!message.hasOwnProperty("id")) { + console.error("Invalid response message received: ", JSON.stringify(message)); + return; + } + channel.execCallbacks[message.id](message.data); + delete channel.execCallbacks[message.id]; + } + + this.handlePropertyUpdate = function(message) + { + message.data.forEach(data => { + var object = channel.objects[data.object]; + if (object) { + object.propertyUpdate(data.signals, data.properties); + } else { + console.warn("Unhandled property update: " + data.object + "::" + data.signal); + } + }); + channel.exec({type: QWebChannelMessageTypes.idle}); + } + + this.debug = function(message) + { + channel.send({type: QWebChannelMessageTypes.debug, data: message}); + }; + + channel.exec({type: QWebChannelMessageTypes.init}, function(data) { + for (const objectName of Object.keys(data)) { + new QObject(objectName, data[objectName], channel); + } + + // now unwrap properties, which might reference other registered objects + for (const objectName of Object.keys(channel.objects)) { + channel.objects[objectName].unwrapProperties(); + } + + if (initCallback) { + initCallback(channel); + } + channel.exec({type: QWebChannelMessageTypes.idle}); + }); +}; + +function QObject(name, data, webChannel) +{ + this.__id__ = name; + webChannel.objects[name] = this; + + // List of callbacks that get invoked upon signal emission + this.__objectSignals__ = {}; + + // Cache of all properties, updated when a notify signal is emitted + this.__propertyCache__ = {}; + + var object = this; + + // ---------------------------------------------------------------------- + + this.unwrapQObject = function(response) + { + for (const converter of webChannel.usedConverters) { + var result = converter(response); + if (result !== undefined) + return result; + } + + if (response instanceof Array) { + // support list of objects + return response.map(qobj => object.unwrapQObject(qobj)) + } + if (!(response instanceof Object)) + return response; + + if (!response["__QObject*__"] || response.id === undefined) { + var jObj = {}; + for (const propName of Object.keys(response)) { + jObj[propName] = object.unwrapQObject(response[propName]); + } + return jObj; + } + + var objectId = response.id; + if (webChannel.objects[objectId]) + return webChannel.objects[objectId]; + + if (!response.data) { + console.error("Cannot unwrap unknown QObject " + objectId + " without data."); + return; + } + + var qObject = new QObject( objectId, response.data, webChannel ); + qObject.destroyed.connect(function() { + if (webChannel.objects[objectId] === qObject) { + delete webChannel.objects[objectId]; + // reset the now deleted QObject to an empty {} object + // just assigning {} though would not have the desired effect, but the + // below also ensures all external references will see the empty map + // NOTE: this detour is necessary to workaround QTBUG-40021 + Object.keys(qObject).forEach(name => delete qObject[name]); + } + }); + // here we are already initialized, and thus must directly unwrap the properties + qObject.unwrapProperties(); + return qObject; + } + + this.unwrapProperties = function() + { + for (const propertyIdx of Object.keys(object.__propertyCache__)) { + object.__propertyCache__[propertyIdx] = object.unwrapQObject(object.__propertyCache__[propertyIdx]); + } + } + + function addSignal(signalData, isPropertyNotifySignal) + { + var signalName = signalData[0]; + var signalIndex = signalData[1]; + object[signalName] = { + connect: function(callback) { + if (typeof(callback) !== "function") { + console.error("Bad callback given to connect to signal " + signalName); + return; + } + + object.__objectSignals__[signalIndex] = object.__objectSignals__[signalIndex] || []; + object.__objectSignals__[signalIndex].push(callback); + + // only required for "pure" signals, handled separately for properties in propertyUpdate + if (isPropertyNotifySignal) + return; + + // also note that we always get notified about the destroyed signal + if (signalName === "destroyed" || signalName === "destroyed()" || signalName === "destroyed(QObject*)") + return; + + // and otherwise we only need to be connected only once + if (object.__objectSignals__[signalIndex].length == 1) { + webChannel.exec({ + type: QWebChannelMessageTypes.connectToSignal, + object: object.__id__, + signal: signalIndex + }); + } + }, + disconnect: function(callback) { + if (typeof(callback) !== "function") { + console.error("Bad callback given to disconnect from signal " + signalName); + return; + } + // This makes a new list. This is important because it won't interfere with + // signal processing if a disconnection happens while emittig a signal + object.__objectSignals__[signalIndex] = (object.__objectSignals__[signalIndex] || []).filter(function(c) { + return c != callback; + }); + if (!isPropertyNotifySignal && object.__objectSignals__[signalIndex].length === 0) { + // only required for "pure" signals, handled separately for properties in propertyUpdate + webChannel.exec({ + type: QWebChannelMessageTypes.disconnectFromSignal, + object: object.__id__, + signal: signalIndex + }); + } + } + }; + } + + /** + * Invokes all callbacks for the given signalname. Also works for property notify callbacks. + */ + function invokeSignalCallbacks(signalName, signalArgs) + { + var connections = object.__objectSignals__[signalName]; + if (connections) { + connections.forEach(function(callback) { + callback.apply(callback, signalArgs); + }); + } + } + + this.propertyUpdate = function(signals, propertyMap) + { + // update property cache + for (const propertyIndex of Object.keys(propertyMap)) { + var propertyValue = propertyMap[propertyIndex]; + object.__propertyCache__[propertyIndex] = this.unwrapQObject(propertyValue); + } + + for (const signalName of Object.keys(signals)) { + // Invoke all callbacks, as signalEmitted() does not. This ensures the + // property cache is updated before the callbacks are invoked. + invokeSignalCallbacks(signalName, signals[signalName]); + } + } + + this.signalEmitted = function(signalName, signalArgs) + { + invokeSignalCallbacks(signalName, this.unwrapQObject(signalArgs)); + } + + function addMethod(methodData) + { + var methodName = methodData[0]; + var methodIdx = methodData[1]; + + // Fully specified methods are invoked by id, others by name for host-side overload resolution + var invokedMethod = methodName[methodName.length - 1] === ')' ? methodIdx : methodName + + object[methodName] = function() { + var args = []; + var callback; + var errCallback; + for (var i = 0; i < arguments.length; ++i) { + var argument = arguments[i]; + if (typeof argument === "function") + callback = argument; + else + args.push(argument); + } + + var result; + // during test, webChannel.exec synchronously calls the callback + // therefore, the promise must be constucted before calling + // webChannel.exec to ensure the callback is set up + if (!callback && (typeof(Promise) === 'function')) { + result = new Promise(function(resolve, reject) { + callback = resolve; + errCallback = reject; + }); + } + + webChannel.exec({ + "type": QWebChannelMessageTypes.invokeMethod, + "object": object.__id__, + "method": invokedMethod, + "args": args + }, function(response) { + if (response !== undefined) { + var result = object.unwrapQObject(response); + if (callback) { + (callback)(result); + } + } else if (errCallback) { + (errCallback)(); + } + }); + + return result; + }; + } + + function bindGetterSetter(propertyInfo) + { + var propertyIndex = propertyInfo[0]; + var propertyName = propertyInfo[1]; + var notifySignalData = propertyInfo[2]; + // initialize property cache with current value + // NOTE: if this is an object, it is not directly unwrapped as it might + // reference other QObject that we do not know yet + object.__propertyCache__[propertyIndex] = propertyInfo[3]; + + if (notifySignalData) { + if (notifySignalData[0] === 1) { + // signal name is optimized away, reconstruct the actual name + notifySignalData[0] = propertyName + "Changed"; + } + addSignal(notifySignalData, true); + } + + Object.defineProperty(object, propertyName, { + configurable: true, + get: function () { + var propertyValue = object.__propertyCache__[propertyIndex]; + if (propertyValue === undefined) { + // This shouldn't happen + console.warn("Undefined value in property cache for property \"" + propertyName + "\" in object " + object.__id__); + } + + return propertyValue; + }, + set: function(value) { + if (value === undefined) { + console.warn("Property setter for " + propertyName + " called with undefined value!"); + return; + } + object.__propertyCache__[propertyIndex] = value; + var valueToSend = value; + webChannel.exec({ + "type": QWebChannelMessageTypes.setProperty, + "object": object.__id__, + "property": propertyIndex, + "value": valueToSend + }); + } + }); + + } + + // ---------------------------------------------------------------------- + + data.methods.forEach(addMethod); + + data.properties.forEach(bindGetterSetter); + + data.signals.forEach(function(signal) { addSignal(signal, false); }); + + Object.assign(object, data.enums); +} + +QObject.prototype.toJSON = function() { + if (this.__id__ === undefined) return {}; + return { + id: this.__id__, + "__QObject*__": true + }; +}; + +//required for use with nodejs +if (typeof module === 'object') { + module.exports = { + QWebChannel: QWebChannel + }; +} From ed7c8a5d851f463ac191b8e5cfc24a43630024fd Mon Sep 17 00:00:00 2001 From: FlyAndNotDown Date: Mon, 11 Aug 2025 22:07:47 +0800 Subject: [PATCH 2/4] feat: web channel basic test --- Editor/Include/Editor/Widget/ProjectHub.h | 15 +++++++++++++++ Editor/Include/Editor/Widget/WebWidget.h | 7 +++++++ Editor/Src/Widget/ProjectHub.cpp | 17 +++++++++++++++++ Editor/Src/Widget/WebWidget.cpp | 7 +++++++ Editor/Web/src/pages/project-hub.tsx | 15 ++++++++++++++- Editor/Web/src/qwebchannel.d.ts | 8 ++++++++ Editor/Web/src/qwebchannel.js | 8 ++++---- 7 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 Editor/Web/src/qwebchannel.d.ts diff --git a/Editor/Include/Editor/Widget/ProjectHub.h b/Editor/Include/Editor/Widget/ProjectHub.h index 277e0d77e..855320d73 100644 --- a/Editor/Include/Editor/Widget/ProjectHub.h +++ b/Editor/Include/Editor/Widget/ProjectHub.h @@ -7,10 +7,25 @@ #include namespace Editor { + class ProjectHub; + + class ProjectHubBridge final : public QObject { + Q_OBJECT + + public: + explicit ProjectHubBridge(ProjectHub* parent = nullptr); + + public Q_SLOTS: + void CreateProject() const; + }; + class ProjectHub final : public WebWidget { Q_OBJECT public: explicit ProjectHub(QWidget* inParent = nullptr); + + private: + ProjectHubBridge* bridge; }; } diff --git a/Editor/Include/Editor/Widget/WebWidget.h b/Editor/Include/Editor/Widget/WebWidget.h index 794cd2e64..1015ca5a4 100644 --- a/Editor/Include/Editor/Widget/WebWidget.h +++ b/Editor/Include/Editor/Widget/WebWidget.h @@ -4,6 +4,7 @@ #pragma once +#include #include namespace Editor { @@ -15,5 +16,11 @@ namespace Editor { ~WebWidget() override; void Load(const std::string& inUrl); + + protected: + QWebChannel* GetWebChannel() const; + + private: + QWebChannel* webChannel; }; } diff --git a/Editor/Src/Widget/ProjectHub.cpp b/Editor/Src/Widget/ProjectHub.cpp index ab45d6ba7..3ce48ca95 100644 --- a/Editor/Src/Widget/ProjectHub.cpp +++ b/Editor/Src/Widget/ProjectHub.cpp @@ -2,14 +2,31 @@ // Created by johnk on 2025/8/3. // +#include + #include #include +#include namespace Editor { + ProjectHubBridge::ProjectHubBridge(ProjectHub* parent) + : QObject(parent) + { + } + + void ProjectHubBridge::CreateProject() const + { + // TODO + LogInfo(ProjectHub, "ProjectHubBridge::CreateProject"); + } + ProjectHub::ProjectHub(QWidget* inParent) : WebWidget(inParent) { setFixedSize(800, 600); Load("/project-hub"); + + bridge = new ProjectHubBridge(this); + GetWebChannel()->registerObject("bridge", bridge); } } // namespace Editor diff --git a/Editor/Src/Widget/WebWidget.cpp b/Editor/Src/Widget/WebWidget.cpp index b851d49a1..310f693e2 100644 --- a/Editor/Src/Widget/WebWidget.cpp +++ b/Editor/Src/Widget/WebWidget.cpp @@ -18,6 +18,8 @@ namespace Editor { WebWidget::WebWidget(QWidget* inParent) : QWebEngineView(inParent) { + webChannel = new QWebChannel(this); + page()->setWebChannel(webChannel); } WebWidget::~WebWidget() = default; @@ -31,4 +33,9 @@ namespace Editor { const std::string fullUrl = baseUrl + inUrl; load(QUrl(fullUrl.c_str())); } + + QWebChannel* WebWidget::GetWebChannel() const + { + return webChannel; + } } // namespace Editor diff --git a/Editor/Web/src/pages/project-hub.tsx b/Editor/Web/src/pages/project-hub.tsx index 476336e08..6e802ccc7 100644 --- a/Editor/Web/src/pages/project-hub.tsx +++ b/Editor/Web/src/pages/project-hub.tsx @@ -1,3 +1,5 @@ +import { useEffect } from "react"; +import { QWebChannel } from '@/qwebchannel' import { Tabs, Tab } from '@heroui/tabs'; import { User } from '@heroui/user'; import { Form } from '@heroui/form'; @@ -5,6 +7,17 @@ import { Button } from '@heroui/button'; import { Input } from '@heroui/input'; export default function ProjectHubPage() { + useEffect(() => { + new QWebChannel(window.qt.webChannelTransport, (channel: QWebChannel) : void => { + window.bridge = channel.objects.bridge; + }) + }, []); + + function onCreateProject(): void + { + window.bridge.CreateProject(); + } + return (
@@ -23,7 +36,7 @@ export default function ProjectHubPage() { - + diff --git a/Editor/Web/src/qwebchannel.d.ts b/Editor/Web/src/qwebchannel.d.ts new file mode 100644 index 000000000..a1555fe55 --- /dev/null +++ b/Editor/Web/src/qwebchannel.d.ts @@ -0,0 +1,8 @@ +export { QWebChannel } from './qwebchannel.js'; + +declare global { + interface Window { + qt: any; + bridge: any; + } +} diff --git a/Editor/Web/src/qwebchannel.js b/Editor/Web/src/qwebchannel.js index 56fa66a65..13a7dab75 100644 --- a/Editor/Web/src/qwebchannel.js +++ b/Editor/Web/src/qwebchannel.js @@ -448,8 +448,8 @@ QObject.prototype.toJSON = function() { }; //required for use with nodejs -if (typeof module === 'object') { - module.exports = { - QWebChannel: QWebChannel - }; +//++[kindem] use ES6 export +export { + QWebChannel } +//--[kindem] From b6cb90725c8ddaafedfe16de8b695b4a63d6e01c Mon Sep 17 00:00:00 2001 From: FlyAndNotDown Date: Mon, 11 Aug 2025 22:45:21 +0800 Subject: [PATCH 3/4] fix: web ui server pdoduct version issue --- Editor/Src/WebUIServer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Editor/Src/WebUIServer.cpp b/Editor/Src/WebUIServer.cpp index 7d5b64a80..e9c3e33b1 100644 --- a/Editor/Src/WebUIServer.cpp +++ b/Editor/Src/WebUIServer.cpp @@ -21,6 +21,9 @@ namespace Editor { serverThread = std::make_unique("WebUIServerThread", [this]() -> void { server = Common::MakeUnique(); server->set_mount_point("/", "./Web"); + server->Get("/(.+)", [](const httplib::Request&, httplib::Response& res) { + res.set_file_content("./Web/index.html"); + }); server->listen("localhost", caWebUIPort.GetValue()); }); } From 462f580bb7f460cbbf69252dbca9b5bf3e5930f8 Mon Sep 17 00:00:00 2001 From: FlyAndNotDown Date: Mon, 11 Aug 2025 22:53:04 +0800 Subject: [PATCH 4/4] fix: web ui dev cmd arg --- Editor/Src/Widget/WebWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Editor/Src/Widget/WebWidget.cpp b/Editor/Src/Widget/WebWidget.cpp index 310f693e2..a3de910cc 100644 --- a/Editor/Src/Widget/WebWidget.cpp +++ b/Editor/Src/Widget/WebWidget.cpp @@ -7,7 +7,7 @@ #include static Core::CmdlineArgValue caWebUIDev( - "wevUIDev", "-wevUIDev", false, + "webUIDev", "-webUIDev", false, "Whether to enable hot reload for web UI"); static Core::CmdlineArgValue caWebUIDevServerPort(