From a487bb45b65bebe969e504369495f52533eb7f1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renaud=20Casenave-P=C3=A9r=C3=A9?= Date: Sun, 21 Mar 2021 20:56:22 +0100 Subject: [PATCH] Pass argc/argv to Qt before passing it to ecl QApplication will remove arguments it recognizes but ecl will not detect this and might reference a no more existent argument --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index b0bd7f1..c5183e3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -55,10 +55,11 @@ int catch_all_qexec() { int main(int argc, char** argv) { - EQL::ini(argc, argv); // best initialized here - QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); // for Qt WebEngine QApplication qapp(argc, argv); + + EQL::ini(argc, argv); // best initialized here + QStringList args(QCoreApplication::arguments()); if(args.contains("-h") || (args.contains("--help"))) { std::cout << "Usage: eql5 [file] [-qtpl] [-qgui] [-quic file.ui [:ui-package] [:maximized]] [-slime] [-norc] [-debug-on-error]" << std::endl;