From 14a1d07425df1a38a35ae36e7479a59e96e35747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renaud=20Casenave-P=C3=A9r=C3=A9?= Date: Tue, 22 Oct 2019 12:52:13 +0200 Subject: [PATCH 1/2] Fix various issues in webkit module --- src/gen/webkit/_ini.cpp | 4 ++-- src/gen/webkit/_ini2.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gen/webkit/_ini.cpp b/src/gen/webkit/_ini.cpp index f68fff7..5fc27b7 100644 --- a/src/gen/webkit/_ini.cpp +++ b/src/gen/webkit/_ini.cpp @@ -26,7 +26,7 @@ NumList LWebElementCollection::overrideIds = NumList(); NumList LWebHitTestResult::overrideIds = NumList(); NumList LWebSecurityOrigin::overrideIds = NumList(); -void webkit_ini() { +void* webkit_ini() { static bool _ = false; if(_) return 0; _ = true; ModuleWebkit* module = new ModuleWebkit; module->ini2(); @@ -90,7 +90,7 @@ const QMetaObject* ModuleWebkit::staticMetaObject(int n) { case 278: m = &QWebView::staticMetaObject; break; } return m; } -void deleteNObject(int n, void* p, int gc) { +void ModuleWebkit::deleteNObject(int n, void* p, int gc) { switch(n) { case 264: if(gc) delete (QWebDatabase*)p; else delete (LWebDatabase*)p; break; case 265: if(gc) delete (QWebElement*)p; else delete (LWebElement*)p; break; diff --git a/src/gen/webkit/_ini2.h b/src/gen/webkit/_ini2.h index 0c91c29..c9ae13c 100644 --- a/src/gen/webkit/_ini2.h +++ b/src/gen/webkit/_ini2.h @@ -5,4 +5,6 @@ #include #include +Q_DECLARE_METATYPE(QList) + #endif From ec089749b8c737f1000c08917730633201f45753 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 2/2] 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;