mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
opt: disable websecurity to enable cross domain access
without this , javascript can not access certain website dictionary (using iframe ) add --disable-web-security to qapplication argv
This commit is contained in:
parent
7cac8c79b8
commit
3ef3535213
13
main.cc
13
main.cc
|
@ -274,7 +274,18 @@ int main( int argc, char ** argv )
|
|||
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
|
||||
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||
|
||||
QHotkeyApplication app( "GoldenDict", argc, argv );
|
||||
|
||||
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", newArgc, newArgv );
|
||||
LogFilePtrGuard logFilePtrGuard;
|
||||
|
||||
if ( app.isRunning() )
|
||||
|
|
Loading…
Reference in a new issue