| 430 | } |
| 431 | |
| 432 | bool LaunchController::abort() |
| 433 | { |
| 434 | if (!m_launcher) { |
| 435 | return true; |
| 436 | } |
| 437 | if (!m_launcher->canAbort()) { |
| 438 | return false; |
| 439 | } |
| 440 | auto response = CustomMessageBox::selectable(m_parentWidget, tr("Kill Minecraft?"), |
| 441 | tr("This can cause the instance to get corrupted and should only be used if Minecraft " |
| 442 | "is frozen for some reason"), |
| 443 | QMessageBox::Question, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) |
| 444 | ->exec(); |
| 445 | if (response == QMessageBox::Yes) { |
| 446 | return m_launcher->abort(); |
| 447 | } |
| 448 | return false; |
| 449 | } |
no test coverage detected