Diffstat (limited to 'pwmanager/pwmanager/setmasterpwwndimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/setmasterpwwndimpl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pwmanager/pwmanager/setmasterpwwndimpl.cpp b/pwmanager/pwmanager/setmasterpwwndimpl.cpp index 3482643..7041d2e 100644 --- a/pwmanager/pwmanager/setmasterpwwndimpl.cpp +++ b/pwmanager/pwmanager/setmasterpwwndimpl.cpp | |||
@@ -159,35 +159,35 @@ void SetMasterPwWndImpl::keyAvailable_slot(uint32_t cardId, | |||
159 | { | 159 | { |
160 | if (key == "") | 160 | if (key == "") |
161 | return; | 161 | return; |
162 | curCardKey = key; | 162 | curCardKey = key; |
163 | char id_buf[(sizeof(cardId) * 2) + 2 /* "0x" */ + 1 /* NULL */]; | 163 | char id_buf[(sizeof(cardId) * 2) + 2 /* "0x" */ + 1 /* NULL */]; |
164 | memcpy(id_buf, "0x", 2); | 164 | memcpy(id_buf, "0x", 2); |
165 | sprintf(id_buf + 2, "%X", cardId); | 165 | sprintf(id_buf + 2, "%X", cardId); |
166 | curCardIdLabel->setText(id_buf); | 166 | curCardIdLabel->setText(id_buf); |
167 | } | 167 | } |
168 | 168 | ||
169 | string SetMasterPwWndImpl::getPw(bool *useCard) | 169 | string SetMasterPwWndImpl::getPw(bool *useCard) |
170 | { | 170 | { |
171 | int index = mainTab->currentPageIndex(); | 171 | int index = mainTab->currentPageIndex(); |
172 | if (index == 0) { | 172 | if (index == 0) { |
173 | // normal password | 173 | // normal password |
174 | if (useCard) | 174 | if (useCard) |
175 | *useCard = false; | 175 | *useCard = false; |
176 | PWM_ASSERT(pwEdit_1->text() == pwEdit_2->text()); | 176 | PWM_ASSERT(pwEdit_1->text() == pwEdit_2->text()); |
177 | return pwEdit_1->text().latin1(); | 177 | return pwEdit_1->text().latin1(); |
178 | } else { | 178 | } else { |
179 | #ifdef CONFIG_KEYCARD | 179 | #ifdef CONFIG_KEYCARD |
180 | // key-card | 180 | // key-card |
181 | if (useCard) | 181 | if (useCard) |
182 | *useCard = true; | 182 | *useCard = true; |
183 | PWM_ASSERT(curCardKey != ""); | 183 | PWM_ASSERT(curCardKey != ""); |
184 | PWM_ASSERT(curCardIdLabel->text() != STRING_CARD_NONE); | 184 | PWM_ASSERT(curCardIdLabel->text() != STRING_CARD_NONE); |
185 | return curCardKey; | 185 | return curCardKey; |
186 | #endif // CONFIG_KEYCARD | 186 | #endif // CONFIG_KEYCARD |
187 | } | 187 | } |
188 | return ""; | 188 | return ""; |
189 | } | 189 | } |
190 | 190 | ||
191 | #ifndef PWM_EMBEDDED | 191 | #ifndef PWM_EMBEDDED_ |
192 | #include "setmasterpwwndimpl.moc" | 192 | #include "moc_setmasterpwwndimpl.cpp" |
193 | #endif | 193 | #endif |