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

@@ -150,7 +150,9 @@ void ModrinthPage::onSelectionChanged(QModelIndex curr, [[maybe_unused]] QModelI
return;
}
current = m_model->data(curr, Qt::UserRole).value<Modrinth::Modpack>();
QVariant raw = m_model->data(curr, Qt::UserRole);
Q_ASSERT(raw.canConvert<Modrinth::Modpack>());
current = raw.value<Modrinth::Modpack>();
auto name = current.name;
if (!current.extraInfoLoaded) {