chore:当config.ini为[webengine]

noSandbox=true
时,则关闭沙箱运行
This commit is contained in:
2025-09-19 20:16:08 +08:00
parent be6fb10019
commit 1cc49dcaf0

View File

@@ -153,6 +153,10 @@ int main(int argc, char *argv[])
#if defined __sw_64__ || __loongarch__ #if defined __sw_64__ || __loongarch__
chromium_flags.append("--no-sandbox"); chromium_flags.append("--no-sandbox");
#endif #endif
// 如果配置文件中设置了关闭沙箱则添加no-sandbox标志
if (Utils::shouldDisableWebEngineSandbox()) {
chromium_flags.append("--no-sandbox");
}
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", chromium_flags.join(" ").toUtf8()); qputenv("QTWEBENGINE_CHROMIUM_FLAGS", chromium_flags.join(" ").toUtf8());
/** /**
@@ -199,4 +203,4 @@ int main(int argc, char *argv[])
w.show(); w.show();
return a.exec(); return a.exec();
} }