refactor: Transform launcher into QMainWindow

This commit is contained in:
Lars Toenning
2024-02-14 22:48:10 +01:00
parent b8a376701b
commit 9da0630063
4 changed files with 790 additions and 798 deletions

View File

@@ -40,11 +40,13 @@ int main(int argc, char *argv[])
}
//! [SwiftApplicationDemo]
// Dialog to decide external or internal core
CSwiftLauncher launcher;
CGuiApplication::registerAsRunning(); // needed because launcher's exec is called (normally application exec)
if (launcher.exec() == QDialog::Rejected) { return EXIT_SUCCESS; }
launcher.close();
const int res = CGuiApplication::exec();
if (res != EXIT_SUCCESS || !launcher.shouldStartAppDetached())
{
return res;
}
const bool s = launcher.startDetached();
return s ? EXIT_SUCCESS : EXIT_FAILURE;
}