mirror of
https://github.com/status-im/dotherside.git
synced 2025-02-11 20:16:47 +00:00
feat: appname
This commit is contained in:
parent
bf72f0d4da
commit
edc1a9d72b
@ -86,7 +86,7 @@ DOS_API void DOS_CALL dos_qguiapplication_delete(void);
|
|||||||
|
|
||||||
/// \brief Create a QApplication
|
/// \brief Create a QApplication
|
||||||
/// \note The created QApplication should be freed by calling dos_qapplication_delete()
|
/// \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
|
/// \brief Calls the QApplication::exec() function of the current QGuiApplication
|
||||||
/// \note A QApplication should have been already created through dos_qapplication_create()
|
/// \note A QApplication should have been already created through dos_qapplication_create()
|
||||||
|
@ -101,11 +101,10 @@ void dos_qguiapplication_quit()
|
|||||||
qGuiApp->quit();
|
qGuiApp->quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void dos_qapplication_create()
|
void dos_qapplication_create(char *appName)
|
||||||
{
|
{
|
||||||
static int argc = 1;
|
static int argc = 1;
|
||||||
static char empty[1] = {0};
|
static char *argv[] = {appName};
|
||||||
static char *argv[] = {empty};
|
|
||||||
|
|
||||||
register_meta_types();
|
register_meta_types();
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ private slots:
|
|||||||
void testExecution()
|
void testExecution()
|
||||||
{
|
{
|
||||||
bool quit = false;
|
bool quit = false;
|
||||||
dos_qapplication_create();
|
dos_qapplication_create("test");
|
||||||
QTimer::singleShot(100, [&quit]() {
|
QTimer::singleShot(100, [&quit]() {
|
||||||
quit = true;
|
quit = true;
|
||||||
dos_qapplication_quit();
|
dos_qapplication_quit();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user