diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-28 01:16:00 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-28 08:37:45 +0300 |
commit | 97ff7afbe749358728bf4843f1022f2994902ef7 (patch) | |
tree | c89decbf171b6cd39dedb524a9719b84ee43dc1c /launcher/ui/pages/modplatform/technic | |
parent | 7e58b965b770ab75c14f2265b7bd7ded081c66b5 (diff) | |
download | PrismLauncher-97ff7afbe749358728bf4843f1022f2994902ef7.tar.gz PrismLauncher-97ff7afbe749358728bf4843f1022f2994902ef7.tar.bz2 PrismLauncher-97ff7afbe749358728bf4843f1022f2994902ef7.zip |
keep the icon suffix
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/ui/pages/modplatform/technic')
-rw-r--r-- | launcher/ui/pages/modplatform/technic/TechnicModel.cpp | 4 | ||||
-rw-r--r-- | launcher/ui/pages/modplatform/technic/TechnicPage.cpp | 11 |
2 files changed, 6 insertions, 9 deletions
diff --git a/launcher/ui/pages/modplatform/technic/TechnicModel.cpp b/launcher/ui/pages/modplatform/technic/TechnicModel.cpp index f08eb289..954be76d 100644 --- a/launcher/ui/pages/modplatform/technic/TechnicModel.cpp +++ b/launcher/ui/pages/modplatform/technic/TechnicModel.cpp @@ -157,7 +157,7 @@ void Technic::ListModel::searchRequestFinished() pack.logoName = "null"; } else { pack.logoUrl = rawURL; - pack.logoName = rawURL.section(QLatin1Char('/'), -1).section(QLatin1Char('.'), 0, 0); + pack.logoName = rawURL.section(QLatin1Char('/'), -1); } pack.broken = false; newList.append(pack); @@ -179,7 +179,7 @@ void Technic::ListModel::searchRequestFinished() auto iconUrl = Json::requireString(iconObj, "url"); pack.logoUrl = iconUrl; - pack.logoName = iconUrl.section(QLatin1Char('/'), -1).section(QLatin1Char('.'), 0, 0); + pack.logoName = iconUrl.section(QLatin1Char('/'), -1); } else { pack.logoUrl = "null"; pack.logoName = "null"; diff --git a/launcher/ui/pages/modplatform/technic/TechnicPage.cpp b/launcher/ui/pages/modplatform/technic/TechnicPage.cpp index fc678fa2..dbf8c94b 100644 --- a/launcher/ui/pages/modplatform/technic/TechnicPage.cpp +++ b/launcher/ui/pages/modplatform/technic/TechnicPage.cpp @@ -129,14 +129,11 @@ void TechnicPage::suggestCurrent() return; } - QString editedLogoName = "technic_" + current.logoName.section(".", 0, 0); - model->getLogo(current.logoName, current.logoUrl, [this, editedLogoName](QString logo) - { - dialog->setSuggestedIconFromFile(logo, editedLogoName); - }); + QString editedLogoName = "technic_" + current.logoName; + model->getLogo(current.logoName, current.logoUrl, + [this, editedLogoName](QString logo) { dialog->setSuggestedIconFromFile(logo, editedLogoName); }); - if (current.metadataLoaded) - { + if (current.metadataLoaded) { metadataLoaded(); return; } |