| 559 | } |
| 560 | |
| 561 | bool 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 | |
| 576 | QVariant PackProfile::headerData(int section, Qt::Orientation orientation, int role) const |
| 577 | { |
no test coverage detected