chore: fix some codeql warnings (#3840)

This commit is contained in:
Tayou
2025-06-06 14:19:27 +02:00
committed by GitHub
18 changed files with 72 additions and 26 deletions

View File

@@ -135,7 +135,9 @@ void TechnicPage::onSelectionChanged(QModelIndex first, [[maybe_unused]] QModelI
return;
}
current = model->data(first, Qt::UserRole).value<Technic::Modpack>();
QVariant raw = model->data(first, Qt::UserRole);
Q_ASSERT(raw.canConvert<Technic::Modpack>());
current = raw.value<Technic::Modpack>();
suggestCurrent();
}