MCPcopy Create free account
hub / github.com/Neverous/efibooteditor / editCurrentRow

Method editCurrentRow

src/devicepathview.cpp:41–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void 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
60void DevicePathView::removeCurrentRow() const
61{

Callers

nothing calls this directly

Calls 5

setFilePathMethod · 0.80
toFilePathMethod · 0.80
setReadOnlyMethod · 0.45
dataMethod · 0.45
setDataMethod · 0.45

Tested by

no test coverage detected