feat: appname

This commit is contained in:
Richard Ramos 2020-06-25 10:33:02 -04:00 committed by Michał
parent cac8fe48b2
commit 0229edc410
3 changed files with 4 additions and 5 deletions

View File

@ -86,7 +86,7 @@ DOS_API void DOS_CALL dos_qguiapplication_delete(void);
/// \brief Create a QApplication
/// \note The created QApplication should be freed by calling dos_qapplication_delete()
DOS_API void DOS_CALL dos_qapplication_create(void);
DOS_API void DOS_CALL dos_qapplication_create(char *filename);
/// \brief Calls the QApplication::exec() function of the current QGuiApplication
/// \note A QApplication should have been already created through dos_qapplication_create()

View File

@ -101,11 +101,10 @@ void dos_qguiapplication_quit()
qGuiApp->quit();
}
void dos_qapplication_create()
void dos_qapplication_create(char *appName)
{
static int argc = 1;
static char empty[1] = {0};
static char *argv[] = {empty};
static char *argv[] = {appName};
register_meta_types();

View File

@ -75,7 +75,7 @@ private slots:
void testExecution()
{
bool quit = false;
dos_qapplication_create();
dos_qapplication_create("test");
QTimer::singleShot(100, [&quit]() {
quit = true;
dos_qapplication_quit();