| 115 | } |
| 116 | |
| 117 | void KeyTreeView::changeSoPin() |
| 118 | { |
| 119 | pki_scard *scard; |
| 120 | QModelIndex currentIdx = currentIndex(); |
| 121 | |
| 122 | if (!currentIdx.isValid()) |
| 123 | return; |
| 124 | scard = db_base::fromIndex<pki_scard>(currentIdx); |
| 125 | try { |
| 126 | if (!scard->isToken()) { |
| 127 | throw errorEx(tr("This is not a token")); |
| 128 | } |
| 129 | scard->changeSoPin(); |
| 130 | } catch (errorEx &err) { |
| 131 | XCA_ERROR(err); |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | void KeyTreeView::toToken() |
| 136 | { |