MCPcopy Create free account
hub / github.com/chris2511/xca / editComment

Method editComment

widgets/XcaTreeView.cpp:318–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318void XcaTreeView::editComment()
319{
320 pki_base *item = db_base::fromIndex(currentIndex());
321 if (!basemodel || !item)
322 return;
323
324 QWidget *w = new QWidget(nullptr);
325 Ui::ItemProperties *prop = new Ui::ItemProperties();
326 prop->setupUi(w);
327 prop->comment->setPlainText(item->getComment());
328 prop->name->setText(item->getIntName());
329 prop->source->setText(item->pki_source_name());
330 prop->insertionDate->setText(item->getInsertionDate().toPretty());
331 XcaDialog *d = new XcaDialog(this, item->getType(), w,
332 tr("Item properties"), QString(), "itemproperties");
333 if (d->exec()) {
334 item->setIntName(prop->name->text());
335 item->setComment(prop->comment->toPlainText());
336 basemodel->updateItem(item);
337 }
338 delete d;
339}
340
341void XcaTreeView::pem2clipboard()
342{

Callers

nothing calls this directly

Calls 11

getCommentMethod · 0.80
getIntNameMethod · 0.80
pki_source_nameMethod · 0.80
toPrettyMethod · 0.80
getInsertionDateMethod · 0.80
setIntNameMethod · 0.80
setCommentMethod · 0.80
updateItemMethod · 0.80
QStringClass · 0.50
getTypeMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected