|
@ -425,42 +425,12 @@ int main(int argc, char **argv) |
|
|
if(candidates.length() == 1){ |
|
|
if(candidates.length() == 1){ |
|
|
iconToBeUsed = candidates.at(0); // The only choice
|
|
|
iconToBeUsed = candidates.at(0); // The only choice
|
|
|
} else if(candidates.length() > 1){ |
|
|
} else if(candidates.length() > 1){ |
|
|
foreach(QString current, candidates) { |
|
|
const QStringList iconPriorities{"256", "128", "svg", "svgz", "512", "1024", "64", "48", "xpm"}; |
|
|
if(current.contains("256")){ |
|
|
foreach (const QString &iconPriority, iconPriorities) { |
|
|
iconToBeUsed = current; |
|
|
const auto filteredCandidates = candidates.filter(iconPriority); |
|
|
continue; |
|
|
if (!filteredCandidates.isEmpty()) { |
|
|
} |
|
|
iconToBeUsed = filteredCandidates.first(); |
|
|
if(current.contains("128")){ |
|
|
break; |
|
|
iconToBeUsed = current; |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
if(current.contains("svg")){ |
|
|
|
|
|
iconToBeUsed = current; |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
if(current.contains("svgz")){ |
|
|
|
|
|
iconToBeUsed = current; |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
if(current.contains("512")){ |
|
|
|
|
|
iconToBeUsed = current; |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
if(current.contains("1024")){ |
|
|
|
|
|
iconToBeUsed = current; |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
if(current.contains("64")){ |
|
|
|
|
|
iconToBeUsed = current; |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
if(current.contains("48")){ |
|
|
|
|
|
iconToBeUsed = current; |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
if(current.contains("xpm")){ |
|
|
|
|
|
iconToBeUsed = current; |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|