feat: appname
This commit is contained in:
parent
cac8fe48b2
commit
0229edc410
|
@ -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()
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue