chore: fix some codeql warnings (#3840)
This commit is contained in:
commit
a17ea196c1
18 changed files with 72 additions and 26 deletions
|
@ -79,6 +79,7 @@ bool ListModel::setData(const QModelIndex& index, const QVariant& value, [[maybe
|
|||
if (pos >= modpacks.size() || pos < 0 || !index.isValid())
|
||||
return false;
|
||||
|
||||
Q_ASSERT(value.canConvert<Flame::IndexedPack>());
|
||||
modpacks[pos] = value.value<Flame::IndexedPack>();
|
||||
|
||||
return true;
|
||||
|
|
|
@ -166,7 +166,9 @@ void FlamePage::onSelectionChanged(QModelIndex curr, [[maybe_unused]] QModelInde
|
|||
return;
|
||||
}
|
||||
|
||||
current = listModel->data(curr, Qt::UserRole).value<Flame::IndexedPack>();
|
||||
QVariant raw = listModel->data(curr, Qt::UserRole);
|
||||
Q_ASSERT(raw.canConvert<Flame::IndexedPack>());
|
||||
current = raw.value<Flame::IndexedPack>();
|
||||
|
||||
if (!current.versionsLoaded || m_filterWidget->changed()) {
|
||||
qDebug() << "Loading flame modpack versions";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue