| 467 | } |
| 468 | |
| 469 | bool LaunchController::abort() |
| 470 | { |
| 471 | if(!m_launcher) |
| 472 | { |
| 473 | return true; |
| 474 | } |
| 475 | if(!m_launcher->canAbort()) |
| 476 | { |
| 477 | return false; |
| 478 | } |
| 479 | auto response = CustomMessageBox::selectable( |
| 480 | m_parentWidget, tr("Kill Minecraft?"), |
| 481 | tr("This can cause the instance to get corrupted and should only be used if Minecraft " |
| 482 | "is frozen for some reason"), |
| 483 | QMessageBox::Question, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)->exec(); |
| 484 | if (response == QMessageBox::Yes) |
| 485 | { |
| 486 | return m_launcher->abort(); |
| 487 | } |
| 488 | return false; |
| 489 | } |
no test coverage detected