MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / setData

Method setData

launcher/minecraft/PackProfile.cpp:561–574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559}
560
561bool PackProfile::setData(const QModelIndex& index, [[maybe_unused]] const QVariant& value, int role)
562{
563 if (!index.isValid() || index.row() < 0 || index.row() >= rowCount(index.parent())) {
564 return false;
565 }
566
567 if (role == Qt::CheckStateRole) {
568 auto component = d->components[index.row()];
569 if (component->setEnabled(!component->isEnabled())) {
570 return true;
571 }
572 }
573 return false;
574}
575
576QVariant PackProfile::headerData(int section, Qt::Orientation orientation, int role) const
577{

Callers 1

populateLaunchMenuMethod · 0.45

Calls 4

setEnabledMethod · 0.80
isEnabledMethod · 0.80
isValidMethod · 0.45
parentMethod · 0.45

Tested by

no test coverage detected