gui: Fix dispatch of SandboxedProcessor
There was an off-by-one, the SandboxedProcessor was only passed 'process', not the path to the file. No processor was found for 'process', thus 'nothingProcessor' was returned. Therefore, we never sandboxed (because we never had to process anything). The sandboxing would have failed though, because we need to launch QCoreApplication, not QApplication. The CLI was never affected.
This commit is contained in:
والد
bb1e653690
کامیت
e715be9787
|
@ -89,16 +89,16 @@ int main(int argc, char *argv[])
|
||||||
if(arg == "process")
|
if(arg == "process")
|
||||||
{
|
{
|
||||||
Common::setupAppInfo();
|
Common::setupAppInfo();
|
||||||
QApplication a(argc, argv);
|
QCoreApplication a(argc, argv);
|
||||||
|
|
||||||
QStringList args = a.arguments();
|
QStringList args = a.arguments();
|
||||||
if(args.length() < 1)
|
if(args.length() < 3)
|
||||||
{
|
{
|
||||||
qDebug() << "Filename is required";
|
qDebug() << "Filename is required";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString file = args.at(1);
|
QString file = args.at(2);
|
||||||
SandboxedProcessor processor(file);
|
SandboxedProcessor processor(file);
|
||||||
return processor.process();
|
return processor.process();
|
||||||
}
|
}
|
||||||
|
|
بارگذاری…
مرجع در شماره جدید