chore: fix some codeql warnings

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2025-06-05 09:26:00 +03:00
parent 0136c2e82a
commit 7ea15c31a1
No known key found for this signature in database
GPG key ID: 55EF5DA53DB36318
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) {