| 316 | } |
| 317 | |
| 318 | void 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 | |
| 341 | void XcaTreeView::pem2clipboard() |
| 342 | { |
nothing calls this directly
no test coverage detected