mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-02 11:26:59 +03:00
chore(clang-tidy): modernize the code
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
18f04b1e29
commit
9c88eb9bc0
36 changed files with 713 additions and 632 deletions
|
|
@ -62,7 +62,7 @@ void ModrinthCheckUpdate::executeTask()
|
|||
// Sadly the API can only handle one hash type per call, se we
|
||||
// need to generate a new hash if the current one is innadequate
|
||||
// (though it will rarely happen, if at all)
|
||||
if (resource->metadata()->hash_format != m_hashType) {
|
||||
if (resource->metadata()->hashFormat != m_hashType) {
|
||||
auto hashTask = Hashing::createHasher(resource->fileinfo().absoluteFilePath(), ModPlatform::ResourceProvider::MODRINTH);
|
||||
connect(hashTask.get(), &Hashing::Hasher::resultsReady,
|
||||
[this, resource](const QString& hash) { m_mappings.insert(hash, resource); });
|
||||
|
|
@ -176,12 +176,12 @@ void ModrinthCheckUpdate::checkVersionsResponse(QByteArray* response, std::optio
|
|||
auto pack = std::make_shared<ModPlatform::IndexedPack>();
|
||||
pack->name = resource->name();
|
||||
pack->slug = resource->metadata()->slug;
|
||||
pack->addonId = resource->metadata()->project_id;
|
||||
pack->addonId = resource->metadata()->projectId;
|
||||
pack->provider = ModPlatform::ResourceProvider::MODRINTH;
|
||||
if ((projectVer.hash != hash && projectVer.is_preferred) || (resource->status() == ResourceStatus::NotInstalled)) {
|
||||
auto downloadTask = makeShared<ResourceDownloadTask>(pack, projectVer, m_resourceModel, true, "update");
|
||||
|
||||
QString oldVersion = resource->metadata()->version_number;
|
||||
QString oldVersion = resource->metadata()->versionNumber;
|
||||
if (oldVersion.isEmpty()) {
|
||||
if (resource->status() == ResourceStatus::NotInstalled) {
|
||||
oldVersion = tr("Not installed");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue