From b207691334ff4d0e65d8e3c8a8d6f7ca8dbb688c Mon Sep 17 00:00:00 2001 From: YiFang Xiao Date: Mon, 11 Dec 2023 17:19:07 +0800 Subject: [PATCH] opt: remove disable-web-security parameter this parameter has not documented --- src/main.cc | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main.cc b/src/main.cc index 9fda4c60..0bc1b6d9 100644 --- a/src/main.cc +++ b/src/main.cc @@ -344,17 +344,7 @@ int main( int argc, char ** argv ) qputenv( "QT_AUTO_SCREEN_SCALE_FACTOR", "1" ); QApplication::setHighDpiScaleFactorRoundingPolicy( Qt::HighDpiScaleFactorRoundingPolicy::PassThrough ); - - char ARG_DISABLE_WEB_SECURITY[] = "--disable-web-security"; - int newArgc = argc + 1 + 1; - char ** newArgv = new char *[ newArgc ]; - for ( int i = 0; i < argc; i++ ) { - newArgv[ i ] = argv[ i ]; - } - newArgv[ argc ] = ARG_DISABLE_WEB_SECURITY; - newArgv[ argc + 1 ] = nullptr; - - QHotkeyApplication app( "GoldenDict-ng", newArgc, newArgv ); + QHotkeyApplication app( "GoldenDict-ng", argc, argv ); QHotkeyApplication::setApplicationName( "GoldenDict-ng" ); QHotkeyApplication::setOrganizationDomain( "https://github.com/xiaoyifang/goldendict-ng" );