MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / getIcon

Method getIcon

launcher/icons/IconList.cpp:445–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445QIcon IconList::getIcon(const QString &key) const
446{
447 int icon_index = getIconIndex(key);
448
449 if (icon_index != -1)
450 return icons[icon_index].icon();
451
452 // Fallback for icons that don't exist.
453 icon_index = getIconIndex("grass");
454
455 if (icon_index != -1)
456 return icons[icon_index].icon();
457 return QIcon();
458}
459
460int IconList::getIconIndex(const QString &key) const
461{

Callers 12

iconUpdatedMethod · 0.80
InstanceWindowMethod · 0.80
iconMethod · 0.80
dataMethod · 0.80
CopyInstanceDialogMethod · 0.80
on_iconButton_clickedMethod · 0.80
NewInstanceDialogMethod · 0.80
setSuggestedPackMethod · 0.80
setSuggestedIconMethod · 0.80
on_iconButton_clickedMethod · 0.80

Calls 1

iconMethod · 0.45

Tested by

no test coverage detected