| 707 | } |
| 708 | |
| 709 | HANDLE startBinary(QWidget* parent, const SpawnParameters& sp) |
| 710 | { |
| 711 | HANDLE handle = INVALID_HANDLE_VALUE; |
| 712 | const auto e = spawn::spawn(sp, handle); |
| 713 | |
| 714 | switch (e) { |
| 715 | case ERROR_SUCCESS: { |
| 716 | return handle; |
| 717 | } |
| 718 | |
| 719 | case ERROR_ELEVATION_REQUIRED: { |
| 720 | startBinaryAdmin(parent, sp); |
| 721 | return INVALID_HANDLE_VALUE; |
| 722 | } |
| 723 | |
| 724 | default: { |
| 725 | dialogs::spawnFailed(parent, sp, e); |
| 726 | return INVALID_HANDLE_VALUE; |
| 727 | } |
| 728 | } |
| 729 | } |
| 730 | |
| 731 | QString getExecutableForJarFile(const QString& jarFile) |
| 732 | { |
no test coverage detected