Adapted to new KPasswordEdit::password() signature. This relates to bug 2961.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 6 years ago
parent 17d4378d30
commit 5988388361
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -52,10 +52,10 @@ int main(int argc, char** argv)
} else { } else {
prompt = TDECmdLineArgs::parsedArgs()->arg(0); prompt = TDECmdLineArgs::parsedArgs()->arg(0);
} }
TQCString pw; TQString pw;
KPasswordDialog::disableCoreDumps(); KPasswordDialog::disableCoreDumps();
if (KPasswordDialog::getPassword(pw,prompt,0)==KPasswordDialog::Accepted) { if (KPasswordDialog::getPassword(pw,prompt,0)==KPasswordDialog::Accepted) {
std::cout << pw.data() << std::endl; std::cout << pw.local8Bit().data() << std::endl;
/* cleanup memory */ /* cleanup memory */
pw.replace(0,pw.length(),"0"); pw.replace(0,pw.length(),"0");
return 0; return 0;

@ -54,8 +54,8 @@ const TQString AuthDialogImpl::Username()const
const TQString AuthDialogImpl::Password() const TQString AuthDialogImpl::Password()
{ {
#if 0 #if 0
/* as described in interface description wie must make a copy of string */ /* as described in interface description we must make a copy of string */
curPass = TQString::fromUtf8(m_PasswordEdit->password()); curPass = m_PasswordEdit->password();
return curPass; return curPass;
#endif #endif
return m_PasswordEdit->text(); return m_PasswordEdit->text();

@ -293,7 +293,7 @@ bool CContextListener::contextSslClientCertPwPrompt (TQString & password,
{ {
maysave = false; maysave = false;
emit waitShow(true); emit waitShow(true);
TQCString npass; TQString npass;
int keep = 1; int keep = 1;
int res = KPasswordDialog::getPassword(npass, int res = KPasswordDialog::getPassword(npass,
i18n("Enter password for realm %1").arg(realm), i18n("Enter password for realm %1").arg(realm),

@ -236,13 +236,13 @@ int tdesvnd_dcop::get_sslaccept(TQString hostname,TQString fingerprint,TQString
TQStringList tdesvnd_dcop::get_sslclientcertpw(TQString realm) TQStringList tdesvnd_dcop::get_sslclientcertpw(TQString realm)
{ {
TQStringList resList; TQStringList resList;
TQCString npass; TQString npass;
int keep = 1; int keep = 1;
int res = KPasswordDialog::getPassword(npass,i18n("Enter password for realm %1").arg(realm),&keep); int res = KPasswordDialog::getPassword(npass,i18n("Enter password for realm %1").arg(realm),&keep);
if (res!=KPasswordDialog::Accepted) { if (res!=KPasswordDialog::Accepted) {
return resList; return resList;
} }
resList.append(TQString(npass)); resList.append(npass);
if (keep) { if (keep) {
resList.append("true"); resList.append("true");
} else { } else {

Loading…
Cancel
Save