chore: fix some codeql warnings
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QList>
|
||||
#include <QMetaType>
|
||||
#include <QString>
|
||||
|
||||
namespace Technic {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user