From fd1ed3eba8ec1a99c8a196fbd2627148820fd2ea Mon Sep 17 00:00:00 2001 From: Andrei Smirnov Date: Mon, 19 Jul 2021 12:14:41 +0300 Subject: [PATCH] Passing argc, argv to QGuiApplication --- vendor/DOtherSide/lib/include/DOtherSide/DOtherSide.h | 2 +- vendor/DOtherSide/lib/src/DOtherSide.cpp | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/vendor/DOtherSide/lib/include/DOtherSide/DOtherSide.h b/vendor/DOtherSide/lib/include/DOtherSide/DOtherSide.h index b62fbb69a4..190ceb2176 100644 --- a/vendor/DOtherSide/lib/include/DOtherSide/DOtherSide.h +++ b/vendor/DOtherSide/lib/include/DOtherSide/DOtherSide.h @@ -66,7 +66,7 @@ DOS_API void DOS_CALL dos_qapplication_initialize_opengl(void); /// \brief Create a QGuiApplication /// \note The created QGuiApplication should be freed by calling dos_qguiapplication_delete() -DOS_API void DOS_CALL dos_qguiapplication_create(void); +DOS_API void DOS_CALL dos_qguiapplication_create(int argc, char** argv); /// \brief Calls the QGuiApplication::exec() function of the current QGuiApplication /// \note A QGuiApplication should have been already created through dos_qguiapplication_create() diff --git a/vendor/DOtherSide/lib/src/DOtherSide.cpp b/vendor/DOtherSide/lib/src/DOtherSide.cpp index 7bac2041fc..ae735d0970 100644 --- a/vendor/DOtherSide/lib/src/DOtherSide.cpp +++ b/vendor/DOtherSide/lib/src/DOtherSide.cpp @@ -127,12 +127,8 @@ void dos_qapplication_initialize_opengl() QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); } -void dos_qguiapplication_create() +void dos_qguiapplication_create(int argc, char** argv) { - static int argc = 1; - static char empty[1] = {0}; - static char *argv[] = {empty}; - register_meta_types(); new QGuiApplication(argc, argv);