fixed code scaning
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
4c52b18bdd
commit
58efd3e9e2
@ -108,7 +108,7 @@ class ResourceAPI {
|
||||
void operator=(ProjectInfoArgs other) { pack = other.pack; }
|
||||
};
|
||||
struct ProjectInfoCallbacks {
|
||||
std::function<void(QJsonDocument&, ModPlatform::IndexedPack)> on_succeed;
|
||||
std::function<void(QJsonDocument&, const ModPlatform::IndexedPack&)> on_succeed;
|
||||
std::function<void(QString const& reason)> on_fail;
|
||||
std::function<void()> on_abort;
|
||||
};
|
||||
|
@ -152,7 +152,7 @@ void ResourceModel::search()
|
||||
};
|
||||
|
||||
if (!callbacks.on_succeed)
|
||||
callbacks.on_succeed = [this](auto& doc, auto pack) {
|
||||
callbacks.on_succeed = [this](auto& doc, auto& pack) {
|
||||
if (!s_running_models.constFind(this).value())
|
||||
return;
|
||||
searchRequestForOneSucceeded(doc);
|
||||
@ -219,9 +219,10 @@ void ResourceModel::loadEntry(QModelIndex& entry)
|
||||
|
||||
// Use default if no callbacks are set
|
||||
if (!callbacks.on_succeed)
|
||||
callbacks.on_succeed = [this, entry](auto& doc, auto pack) {
|
||||
callbacks.on_succeed = [this, entry](auto& doc, auto& newpack) {
|
||||
if (!s_running_models.constFind(this).value())
|
||||
return;
|
||||
auto pack = newpack;
|
||||
infoRequestSucceeded(doc, pack, entry);
|
||||
};
|
||||
if (!callbacks.on_fail)
|
||||
|
Loading…
Reference in New Issue
Block a user