fix: icon import with dot in name
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
497cea0bd5
commit
53dcc15766
2 changed files with 9 additions and 8 deletions
|
@ -263,9 +263,9 @@ void InstanceImportTask::extractFinished()
|
|||
}
|
||||
}
|
||||
|
||||
bool installIcon(QString root, QString instIcon)
|
||||
bool installIcon(QString root, QString instIconKey)
|
||||
{
|
||||
auto importIconPath = IconUtils::findBestIconIn(root, instIcon);
|
||||
auto importIconPath = IconUtils::findBestIconIn(root, instIconKey);
|
||||
if (importIconPath.isNull() || !QFile::exists(importIconPath))
|
||||
importIconPath = IconUtils::findBestIconIn(root, "icon.png");
|
||||
if (importIconPath.isNull() || !QFile::exists(importIconPath))
|
||||
|
@ -273,10 +273,10 @@ bool installIcon(QString root, QString instIcon)
|
|||
if (!importIconPath.isNull() && QFile::exists(importIconPath)) {
|
||||
// import icon
|
||||
auto iconList = APPLICATION->icons();
|
||||
if (iconList->iconFileExists(instIcon)) {
|
||||
iconList->deleteIcon(instIcon);
|
||||
if (iconList->iconFileExists(instIconKey)) {
|
||||
iconList->deleteIcon(instIconKey);
|
||||
}
|
||||
iconList->installIcon(importIconPath, instIcon);
|
||||
iconList->installIcon(importIconPath, instIconKey + ".png");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue