@@ -268,7 +268,7 @@ void IconList::installIcons(const QStringList &iconFiles)
268268 continue ;
269269
270270 const QString sourceHash = getIconHash (sourceFile);
271- QString sourceFileName = fileinfo.baseName ();
271+ QString sourceFileName = fileinfo.baseName (). remove ( " _ " + sourceHash). remove (sourceHash) ;
272272 sourceFileName = QString (" %1_%2.%3" ).arg (sourceFileName, sourceHash, suffix);
273273 QString target = FS::PathCombine (m_dir.dirName (), sourceFileName);
274274
@@ -283,7 +283,7 @@ void IconList::installIcons(const QStringList &iconFiles)
283283 if (sourceHash == targetHash)
284284 continue ;
285285
286- QString targetFileName = fileinfo.baseName ();
286+ QString targetFileName = fileinfo.baseName (). remove ( " _ " + targetHash). remove (targetHash) ;
287287 targetFileName = QString (" %1_%2.%3" ).arg (targetFileName, targetHash, suffix);
288288 targetFileName = FS::PathCombine (m_dir.dirName (), targetFileName);
289289 if (!targetFile.rename (targetFileName))
@@ -309,6 +309,7 @@ void IconList::installIcon(const QString &file, QString &name)
309309 return ;
310310
311311 const QString sourceHash = getIconHash (sourceFile);
312+ name = name.remove (" _" + sourceHash).remove (sourceHash);
312313 name = QString (" %1_%2.%3" ).arg (name, sourceHash, suffix);
313314 QString target = FS::PathCombine (m_dir.dirName (), name);
314315
@@ -323,7 +324,7 @@ void IconList::installIcon(const QString &file, QString &name)
323324 if (sourceHash == targetHash)
324325 return ;
325326
326- QString targetFileName = QString (name);
327+ QString targetFileName = QString (name). remove ( " _ " + targetHash). remove (targetHash) ;
327328 targetFileName = QString (" %1_%2.%3" ).arg (targetFileName, targetHash, suffix);
328329 targetFileName = FS::PathCombine (m_dir.dirName (), targetFileName);
329330 if (!targetFile.rename (targetFileName))
0 commit comments