gui: Call enableSandboxing() after ensureConfigured() so all paths are guaranteed to exist
这个提交包含在:
父节点
30414e3da3
当前提交
d2d576e617
23
gui/main.cpp
23
gui/main.cpp
@ -136,20 +136,18 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
parser.parse(appArgs);
|
parser.parse(appArgs);
|
||||||
|
|
||||||
if(!parser.isSet("no-sandbox"))
|
|
||||||
{
|
|
||||||
enableSandbox(socketPath);
|
|
||||||
qInfo() << "Sandbox: on";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
qInfo() << "Sandbox: off";
|
|
||||||
}
|
|
||||||
// Keep this post sandbox, afterwards does not work (suspect due to threads, but unconfirmed)
|
|
||||||
QApplication a(argc, argv);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Common::ensureConfigured();
|
Common::ensureConfigured();
|
||||||
|
if(!parser.isSet("no-sandbox"))
|
||||||
|
{
|
||||||
|
enableSandbox(socketPath);
|
||||||
|
qInfo() << "Sandbox: on";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qInfo() << "Sandbox: off";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch(LooqsGeneralException &e)
|
catch(LooqsGeneralException &e)
|
||||||
{
|
{
|
||||||
@ -157,6 +155,9 @@ int main(int argc, char *argv[])
|
|||||||
QMessageBox::critical(nullptr, "Error", e.message);
|
QMessageBox::critical(nullptr, "Error", e.message);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
// Keep this post sandbox, afterwards does not work (suspect due to threads, but unconfirmed)
|
||||||
|
QApplication a(argc, argv);
|
||||||
|
|
||||||
qRegisterMetaType<QVector<SearchResult>>("QVector<SearchResult>");
|
qRegisterMetaType<QVector<SearchResult>>("QVector<SearchResult>");
|
||||||
qRegisterMetaType<QVector<PreviewResultPdf>>("QVector<PreviewResultPdf>");
|
qRegisterMetaType<QVector<PreviewResultPdf>>("QVector<PreviewResultPdf>");
|
||||||
qRegisterMetaType<PreviewResultPdf>("PreviewResultPdf");
|
qRegisterMetaType<PreviewResultPdf>("PreviewResultPdf");
|
||||||
|
正在加载...
在新工单中引用
屏蔽一个用户