fix: remove qWarning for unknown state
Co-authored-by: TheKodeToad <TheKodeToad@proton.me> Signed-off-by: Sticks <sticks@teamhydra.dev>
This commit is contained in:
parent
ea5458ed22
commit
d4e1851e67
1 changed files with 5 additions and 4 deletions
|
@ -343,14 +343,15 @@ void ModrinthManagedPackPage::suggestVersion()
|
|||
void ManagedPackPage::onUpdateTaskCompleted(bool did_succeed) const
|
||||
{
|
||||
// Close the window if the update was successful
|
||||
if (m_instance_window && did_succeed) {
|
||||
if (did_succeed) {
|
||||
if (m_instance_window != nullptr)
|
||||
m_instance_window->close();
|
||||
|
||||
CustomMessageBox::selectable(nullptr, tr("Update Successful"), tr("The instance updated to pack version %1 successfully.").arg(m_inst->getManagedPackVersionName()), QMessageBox::Information)
|
||||
->show();
|
||||
} else if (!did_succeed) {
|
||||
} else {
|
||||
CustomMessageBox::selectable(nullptr, tr("Update Failed"), tr("The instance failed to update to pack version %1. Please check launcher logs for more information.").arg(m_inst->getManagedPackVersionName()), QMessageBox::Critical)
|
||||
->show();
|
||||
qWarning() << "onUpdateTaskCompleted: unknown state encountered: did_succeed=" << did_succeed << " m_instance_window=" << m_instance_window;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue