| 177 | } |
| 178 | |
| 179 | void EFIBootEditor::enableBootEntryEditor(const QModelIndex &index) |
| 180 | { |
| 181 | if(!index.isValid()) |
| 182 | return disableBootEntryEditor(); |
| 183 | |
| 184 | auto [name, list, model] = currentBootEntryList(); |
| 185 | Q_UNUSED(name) |
| 186 | Q_UNUSED(list) |
| 187 | if(&model != index.model()) |
| 188 | return disableBootEntryEditor(); |
| 189 | |
| 190 | const auto item = index.data().value<const BootEntry *>(); |
| 191 | ui->entry_form->setItem(index, item); |
| 192 | ui->entry_form->setReadOnly((model.options & BootEntryListModel::Option::ReadOnly) || item->is_error); |
| 193 | ui->entry_form->showHotKeys((data.boot_option_support & EFIBoot::EFI_BOOT_OPTION_SUPPORT_KEY) && (model.options & BootEntryListModel::Option::IsBoot)); |
| 194 | } |
| 195 | |
| 196 | void EFIBootEditor::disableBootEntryEditor() |
| 197 | { |
nothing calls this directly
no test coverage detected