| 399 | } |
| 400 | |
| 401 | bool LaunchController::abort() |
| 402 | { |
| 403 | if(!m_launcher) |
| 404 | { |
| 405 | return true; |
| 406 | } |
| 407 | if(!m_launcher->canAbort()) |
| 408 | { |
| 409 | return false; |
| 410 | } |
| 411 | auto response = CustomMessageBox::selectable( |
| 412 | m_parentWidget, tr("Kill Minecraft?"), |
| 413 | tr("This can cause the instance to get corrupted and should only be used if Minecraft " |
| 414 | "is frozen for some reason"), |
| 415 | QMessageBox::Question, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)->exec(); |
| 416 | if (response == QMessageBox::Yes) |
| 417 | { |
| 418 | return m_launcher->abort(); |
| 419 | } |
| 420 | return false; |
| 421 | } |
no test coverage detected