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

Method setData

launcher/minecraft/PackProfile.cpp:615–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613}
614
615bool PackProfile::setData(const QModelIndex& index, const QVariant& value, int role)
616{
617 if (!index.isValid() || index.row() < 0 || index.row() >= rowCount(index))
618 {
619 return false;
620 }
621
622 if (role == Qt::CheckStateRole)
623 {
624 auto component = d->components[index.row()];
625 if (component->setEnabled(!component->isEnabled()))
626 {
627 return true;
628 }
629 }
630 return false;
631}
632
633QVariant PackProfile::headerData(int section, Qt::Orientation orientation, int role) const
634{

Callers

nothing calls this directly

Calls 3

setEnabledMethod · 0.80
isEnabledMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected