From d2d576e61783698c9e774ca6cb27987da60cd9ee Mon Sep 17 00:00:00 2001 From: Albert S Date: Sun, 24 Apr 2022 17:13:43 +0200 Subject: [PATCH] gui: Call enableSandboxing() after ensureConfigured() so all paths are guaranteed to exist --- gui/main.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/gui/main.cpp b/gui/main.cpp index c2669ff..c4810d8 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -136,20 +136,18 @@ int main(int argc, char *argv[]) } 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 { Common::ensureConfigured(); + if(!parser.isSet("no-sandbox")) + { + enableSandbox(socketPath); + qInfo() << "Sandbox: on"; + } + else + { + qInfo() << "Sandbox: off"; + } } catch(LooqsGeneralException &e) { @@ -157,6 +155,9 @@ int main(int argc, char *argv[]) QMessageBox::critical(nullptr, "Error", e.message); return 1; } + // Keep this post sandbox, afterwards does not work (suspect due to threads, but unconfirmed) + QApplication a(argc, argv); + qRegisterMetaType>("QVector"); qRegisterMetaType>("QVector"); qRegisterMetaType("PreviewResultPdf");