fix: remove qWarning for unknown state
Co-authored-by: TheKodeToad <TheKodeToad@proton.me> Signed-off-by: Sticks <sticks@teamhydra.dev> (cherry picked from commit d4e1851e6779d99e3ffde79c7e4e8edb568415ce)
This commit is contained in:
parent
25ce20a877
commit
b0ee4f6e58
@ -343,14 +343,15 @@ void ModrinthManagedPackPage::suggestVersion()
|
|||||||
void ManagedPackPage::onUpdateTaskCompleted(bool did_succeed) const
|
void ManagedPackPage::onUpdateTaskCompleted(bool did_succeed) const
|
||||||
{
|
{
|
||||||
// Close the window if the update was successful
|
// Close the window if the update was successful
|
||||||
if (m_instance_window && did_succeed) {
|
if (did_succeed) {
|
||||||
m_instance_window->close();
|
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)
|
CustomMessageBox::selectable(nullptr, tr("Update Successful"), tr("The instance updated to pack version %1 successfully.").arg(m_inst->getManagedPackVersionName()), QMessageBox::Information)
|
||||||
->show();
|
->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)
|
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();
|
->show();
|
||||||
qWarning() << "onUpdateTaskCompleted: unknown state encountered: did_succeed=" << did_succeed << " m_instance_window=" << m_instance_window;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user