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

Method insertRow

src/devicepathview.cpp:18–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18void DevicePathView::insertRow()
19{
20 if(readonly)
21 return;
22
23 auto index = currentIndex();
24 dialog->setReadOnly(readonly);
25 dialog->setFilePath(nullptr);
26 if(dialog->exec() == QDialog::Accepted)
27 {
28 auto row = index.row();
29 const auto file_path = dialog->toFilePath();
30 if(!model()->insertRow(row + 1))
31 return;
32
33 QVariant _data;
34 _data.setValue(&file_path);
35 index = model()->index(row + 1, 0);
36 if(model()->setData(index, _data))
37 setCurrentIndex(index);
38 }
39}
40
41void DevicePathView::editCurrentRow()
42{

Callers

nothing calls this directly

Calls 5

setFilePathMethod · 0.80
toFilePathMethod · 0.80
indexMethod · 0.80
setReadOnlyMethod · 0.45
setDataMethod · 0.45

Tested by

no test coverage detected