| 39 | } |
| 40 | |
| 41 | void DevicePathView::editCurrentRow() |
| 42 | { |
| 43 | auto index = currentIndex(); |
| 44 | if(!index.isValid() || !model()->checkIndex(index)) |
| 45 | return; |
| 46 | |
| 47 | dialog->setReadOnly(readonly); |
| 48 | dialog->setFilePath(model()->data(index).value<const FilePath::ANY *>()); |
| 49 | const auto status = dialog->exec(); |
| 50 | if(!readonly && status == QDialog::Accepted) |
| 51 | { |
| 52 | const auto file_path = dialog->toFilePath(); |
| 53 | QVariant _data; |
| 54 | _data.setValue(&file_path); |
| 55 | if(model()->setData(index, _data)) |
| 56 | setCurrentIndex(index); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | void DevicePathView::removeCurrentRow() const |
| 61 | { |
nothing calls this directly
no test coverage detected