mobile: turn testqml into a std::string

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-02-28 20:07:39 +01:00 committed by Michael Keller
parent 9509eb6876
commit a133c6c4db
3 changed files with 10 additions and 8 deletions

View file

@ -17,7 +17,7 @@ extern void show_computer_list();
int quit, force_root, ignore_bt;
#ifdef SUBSURFACE_MOBILE_DESKTOP
char *testqml = NULL;
std::string testqml;
#endif
/*
@ -169,8 +169,7 @@ extern "C" void parse_argument(const char *arg)
}
#elif SUBSURFACE_MOBILE_DESKTOP
if (strncmp(arg, "--testqml=", sizeof("--testqml=") - 1) == 0) {
testqml = (char *)malloc(strlen(arg) - sizeof("--testqml=") + 1);
strcpy(testqml, arg + sizeof("--testqml=") - 1);
testqml = arg + sizeof("--testqml=") - 1;
return;
}
#endif