MCPcopy Create free account
hub / github.com/MultiMC/Launcher / getInstanceById

Method getInstanceById

launcher/InstanceList.cpp:495–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493}
494
495InstancePtr InstanceList::getInstanceById(QString instId) const
496{
497 if(instId.isEmpty())
498 return InstancePtr();
499 for(auto & inst: m_instances)
500 {
501 if (inst->id() == instId)
502 {
503 return inst;
504 }
505 }
506 return InstancePtr();
507}
508
509QModelIndex InstanceList::getInstanceIndexById(const QString &id) const
510{

Callers 4

messageReceivedMethod · 0.80
instanceActivatedMethod · 0.80
instanceChangedMethod · 0.80

Calls 2

isEmptyMethod · 0.80
idMethod · 0.45

Tested by

no test coverage detected