| 79 | } |
| 80 | |
| 81 | void KeyTreeView::changePin() |
| 82 | { |
| 83 | pki_scard *scard; |
| 84 | QModelIndex currentIdx = currentIndex(); |
| 85 | |
| 86 | if (!currentIdx.isValid()) |
| 87 | return; |
| 88 | scard = db_base::fromIndex<pki_scard>(currentIdx); |
| 89 | try { |
| 90 | if (!scard->isToken()) { |
| 91 | throw errorEx(tr("This is not a token")); |
| 92 | } |
| 93 | scard->changePin(); |
| 94 | } catch (errorEx &err) { |
| 95 | XCA_ERROR(err); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | void KeyTreeView::initPin() |
| 100 | { |