Pass a SystemBootParameters pointer to QtHostInterface::bootSystem

This resolves ownership issues related to the SystemBootParameters
class, since it's meant to be non-copyable but it was copied as per
Qt meta type rules
This commit is contained in:
Silent
2020-09-12 22:01:08 +02:00
parent 95d5417017
commit c47dceffb5
4 changed files with 21 additions and 33 deletions

View File

@ -28,7 +28,7 @@ int main(int argc, char* argv[])
std::unique_ptr<QtHostInterface> host_interface = std::make_unique<QtHostInterface>();
std::unique_ptr<SystemBootParameters> boot_params;
if (!host_interface->parseCommandLineParameters(argc, argv, &boot_params))
if (!host_interface->ParseCommandLineParameters(argc, argv, &boot_params))
return EXIT_FAILURE;
if (!host_interface->Initialize())
@ -48,8 +48,7 @@ int main(int argc, char* argv[])
if (boot_params)
{
host_interface->bootSystem(*boot_params);
boot_params.reset();
host_interface->bootSystem(std::move(boot_params));
}
else
{