View | Details | Raw Unified | Return to bug 7919
Collapse All | Expand All

(-)kdelibs-3.5.7-orig/kdeui/kpassdlg.cpp (-4 / +9 lines)
Lines 206-213 Link Here
206
	if (e->state() & (ControlButton | AltButton))
206
	if (e->state() & (ControlButton | AltButton))
207
	    e->ignore();
207
	    e->ignore();
208
	else if (m_Length) {
208
	else if (m_Length) {
209
	    m_Password[--m_Length] = '\000';
209
            QString newStr = QString::fromLocal8Bit(m_Password, m_Length);
210
	    showPass();
210
            unsigned int newLen = newStr.length();
211
            newLen = newLen ? newLen - 1 : 0;
212
            newStr.setLength(newLen);
213
            erase();
214
            insert(newStr);
211
	}
215
	}
212
	break;
216
	break;
213
    default:
217
    default:
Lines 263-276 Link Here
263
void KPasswordEdit::showPass()
267
void KPasswordEdit::showPass()
264
{
268
{
265
    QString tmp;
269
    QString tmp;
270
    QString newStr = QString::fromLocal8Bit(m_Password, m_Length);
266
271
267
    switch (m_EchoMode) {
272
    switch (m_EchoMode) {
268
    case OneStar:
273
    case OneStar:
269
	tmp.fill('*', m_Length);
274
	tmp.fill('*', newStr.length());
270
	setText(tmp);
275
	setText(tmp);
271
	break;
276
	break;
272
    case ThreeStars:
277
    case ThreeStars:
273
	tmp.fill('*', m_Length*3);
278
	tmp.fill('*', newStr.length()*3);
274
	setText(tmp);
279
	setText(tmp);
275
	break;
280
	break;
276
    case NoEcho: default:
281
    case NoEcho: default:

Return to bug 7919