Run formatter on all our files (#6942)

This commit is contained in:
RickyRister 2026-05-26 15:11:38 -07:00 committed by GitHub
parent b3c89167c5
commit 1d5d3f2d38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 153 additions and 81 deletions

View file

@ -61,24 +61,30 @@ inline QString expandPattern(const QString &pattern,
QString result = pattern;
auto replaceIfPresent = [&](const QString &token, const QString &value) -> bool {
if (!result.contains(token))
if (!result.contains(token)) {
return true;
}
if (value.isEmpty())
if (value.isEmpty()) {
return false;
}
result.replace(token, value);
return true;
};
if (!replaceIfPresent("{name}", name))
if (!replaceIfPresent("{name}", name)) {
return {};
if (!replaceIfPresent("{set}", set))
}
if (!replaceIfPresent("{set}", set)) {
return {};
if (!replaceIfPresent("{collector}", collector))
}
if (!replaceIfPresent("{collector}", collector)) {
return {};
if (!replaceIfPresent("{providerId}", providerId))
}
if (!replaceIfPresent("{providerId}", providerId)) {
return {};
}
return result;
}
@ -96,8 +102,9 @@ generateImportVariants(const QString &name, const QString &set, const QString &c
pattern.replace("_", sep);
QString v = expandPattern(pattern, name, set, collector, providerId);
if (!v.isEmpty())
if (!v.isEmpty()) {
variants << v;
}
}
}

View file

@ -28,8 +28,9 @@ CardPictureLoaderWorker::CardPictureLoaderWorker()
static_cast<qint64>(SettingsCache::instance().getNetworkCacheSizeInMB()));
connect(&SettingsCache::instance(), &SettingsCache::networkCacheSizeChanged, cache, [this](int newSizeInMB) {
if (cache)
if (cache) {
cache->setMaximumCacheSize(1024L * 1024L * static_cast<qint64>(newSizeInMB));
}
});
networkManager->setCache(cache);