| 219 | } |
| 220 | |
| 221 | void MemoryCardSettingsWidget::updateCardActions() |
| 222 | { |
| 223 | QString selectedCard = getSelectedCard(); |
| 224 | const bool hasSelection = !selectedCard.isEmpty(); |
| 225 | |
| 226 | std::optional<AvailableMcdInfo> cardInfo = FileMcd_GetCardInfo(selectedCard.toStdString()); |
| 227 | bool isPS1 = (cardInfo.has_value() ? cardInfo.value().file_type == MemoryCardFileType::PS1 : false); |
| 228 | |
| 229 | m_ui.convertCard->setEnabled(hasSelection && !isPS1); |
| 230 | m_ui.renameCard->setEnabled(hasSelection); |
| 231 | m_ui.deleteCard->setEnabled(hasSelection); |
| 232 | } |
| 233 | |
| 234 | void MemoryCardSettingsWidget::deleteCard() |
| 235 | { |
nothing calls this directly
no test coverage detected