add patch for kdelibs/kdeui/dialogs/knewpassworddialog.cpp

leo peng leo1295 at gmail.com
Thu Nov 13 03:10:47 GMT 2008


2008/11/13 Albert Astals Cid <aacid at kde.org>

> A Dimecres 12 Novembre 2008, leo peng va escriure:
> > I found that if I call "kcmshell4 kcm_useraccount" to change my password,
> > it does nothing.
> > in that window, I clicked "Change Password", then I input the same string
> > twice on the popup window, then
> > clicked Ok, but it will show error.
> >
> > we use class KNewPasswordDialog::password() get input password in dialog,
> > we can get input password after
> >   KNewPasswordDialog::accept().
> > but we will get empty password before use KNewPasswordDialog::accept(),
> > so  set password for current user in
> > kdebase-4.1.2/apps/kdepasswd/passwddlg.cpp (class KDEpasswd2Dialog)
> >
> > I think I fixed the bug, maybe.
>
> This patch is not the correct fix, it completely bypasses the check done in
> KNewPasswordDialog::accept about both lines having the same text and the
> check
> about password strength.
>
> Alternative solutions include:
>  a) Creating a protected function in KNewPasswordDialog that does the
> checking
> done in KNewPasswordDialog::accept so one can call if from
> KDEpasswd2Dialog::accept
>
>  b) Overloading KNewPasswordDialog::checkPassword() in KDEpasswd2Dialog to
> do
> the checking.
>
> Albert
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> unsubscribe <<
>

I change my first patch,  and fix this problem,
I creat a protected function bool KNewPasswordDialog::checkAndGetPwd(QString
&pwd) in KNewPasswordDialog,
    (please see patch : kdelibs-kdeui-dialogs-knewpassworddialog.patch)

this funtion be used in KDEpasswd2Dialog::accept ,
    (please see patch : kdebase-apps-kdepasswd-passwddlg.patch)

I test it is ok.

please see attachment.
Thank you for your help, Albert.

-- 
 best regards !
----------------------
leopeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20081113/c65bc49d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdebase-apps-kdepasswd-passwddlg.patch
Type: application/octet-stream
Size: 444 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20081113/c65bc49d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-kdeui-dialogs-knewpassworddialog.patch
Type: application/octet-stream
Size: 2180 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20081113/c65bc49d/attachment-0001.obj>
-------------- next part --------------
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


More information about the kde-core-devel mailing list