mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
refs #883, application class extended
* allow to register application as running (needed for launcher) * getExecutableForApplication * swift launcher can be started
This commit is contained in:
committed by
Mathew Sutcliffe
parent
c8c18b0b21
commit
24a9b332b0
@@ -30,7 +30,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
//! [SwiftApplicationDemo]
|
||||
CGuiApplication::highDpiScreenSupport();
|
||||
QApplication qa(argc, argv);
|
||||
QApplication qa(argc, argv); // needed
|
||||
Q_UNUSED(qa);
|
||||
CGuiApplication a("swift launcher", CApplicationInfo::Laucher, CIcons::swiftLauncher1024());
|
||||
a.addParserOption({{"i", "installer"}, QCoreApplication::translate("main", "Installer setup."), "installer"});
|
||||
if (!a.parse()) { return EXIT_FAILURE; }
|
||||
@@ -44,6 +45,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Dialog to decide external or internal core
|
||||
CSwiftLauncher launcher;
|
||||
CGuiApplication::registerAsRunning(); // needed because own exec is called
|
||||
if (launcher.exec() == QDialog::Rejected) { return EXIT_SUCCESS; }
|
||||
launcher.close();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user