diff options
author | jan Iversen <jan@casacondor.com> | 2019-11-23 13:02:41 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-11-26 09:44:13 -0800 |
commit | 624bd9e7eca1291a4a7b8caecd6082f08804e99c (patch) | |
tree | fffe9ca595aeae2de1837c36347b1589fba26cf0 /core/subsurfacestartup.c | |
parent | b4b4e7872bb3078166a4b7519d26ca0828105ce4 (diff) | |
download | subsurface-624bd9e7eca1291a4a7b8caecd6082f08804e99c.tar.gz |
core: add --testqml flag to mobileExecutable
Add flag to subsurface_mobile (only when compiling for desktop)
to allow using qml files from disk instead of resources.
This allows testing qml changes with just restarting subsurface_mobile.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Diffstat (limited to 'core/subsurfacestartup.c')
-rw-r--r-- | core/subsurfacestartup.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/subsurfacestartup.c b/core/subsurfacestartup.c index 920285b14..bc3197ef1 100644 --- a/core/subsurfacestartup.c +++ b/core/subsurfacestartup.c @@ -106,6 +106,9 @@ struct preferences default_prefs = { }; int run_survey; +#ifdef SUBSURFACE_MOBILE_DESKTOP +char *testqml = NULL; +#endif const struct units *get_units() { @@ -183,6 +186,9 @@ static void print_help() printf("\n --version Prints current version"); printf("\n --survey Offer to submit a user survey"); printf("\n --user=<test> Choose configuration space for user <test>"); +#ifdef SUBSURFACE_MOBILE_DESKTOP + printf("\n --testqml=<dir> Use QML files from <dir> instead of QML resources"); +#endif printf("\n --cloud-timeout=<nr> Set timeout for cloud connection (0 < timeout < 60)\n\n"); } @@ -241,6 +247,13 @@ void parse_argument(const char *arg) ++force_root; return; } +#ifdef SUBSURFACE_MOBILE_DESKTOP + if (strncmp(arg, "--testqml=", sizeof("--testqml=") - 1) == 0) { + testqml = malloc(strlen(arg) - sizeof("--testqml=") + 1); + strcpy(testqml, arg + sizeof("--testqml=") - 1); + return; + } +#endif /* fallthrough */ case 'p': /* ignore process serial number argument when run as native macosx app */ |