move serverAddr to main.cpp (for wasm)

This commit is contained in:
notify 2023-01-04 10:19:51 +08:00
parent fb425e15fb
commit 9de041e969
2 changed files with 2 additions and 1 deletions

View File

@ -6,7 +6,7 @@ Item {
scale: 2
// Change this to your server's IP or domain name
property string server_addr: "127.0.0.1:9530"
property string server_addr: ServerAddr
Frame {
id: join_server

View File

@ -153,6 +153,7 @@ int main(int argc, char *argv[])
system = "Android";
#elif defined(Q_OS_WASM)
system = "Web";
engine->rootContext()->setContextProperty("ServerAddr", "127.0.0.1:9530");
#elif defined(Q_OS_WIN32)
system = "Win";
#elif defined(Q_OS_LINUX)