| 97 | } |
| 98 | |
| 99 | void KeyTreeView::initPin() |
| 100 | { |
| 101 | pki_scard *scard; |
| 102 | QModelIndex currentIdx = currentIndex(); |
| 103 | |
| 104 | if (!currentIdx.isValid()) |
| 105 | return; |
| 106 | scard = db_base::fromIndex<pki_scard>(currentIdx); |
| 107 | try { |
| 108 | if (!scard->isToken()) { |
| 109 | throw errorEx(tr("This is not a token")); |
| 110 | } |
| 111 | scard->initPin(); |
| 112 | } catch (errorEx &err) { |
| 113 | XCA_ERROR(err); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | void KeyTreeView::changeSoPin() |
| 118 | { |