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 4737b7c081
commit 8bd9acb7e2
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -299,7 +299,7 @@ int LDAPManager::bind(TQString* errstr) {
if (!m_creds) {
m_creds = new LDAPCredentials();
m_creds->username = passdlg.m_base->ldapAdminUsername->text();
m_creds->password = passdlg.m_base->ldapAdminPassword->password();
m_creds->password = passdlg.m_base->ldapAdminPassword->password().utf8();
m_creds->realm = passdlg.m_base->ldapAdminRealm->currentText();
m_creds->use_tls = passdlg.m_base->ldapUseTLS->isOn();
m_creds->use_gssapi = passdlg.use_gssapi;
@ -1252,10 +1252,10 @@ int LDAPManager::bindKAdmin(LDAPCredentials *administrativeCredentials, TQString
if (admincreds.use_gssapi) {
// FIXME
// Heimdal has issues parsing the keytab file, so for now just prompt for password
TQCString password;
TQString password;
int result = KPasswordDialog::getPassword(password, i18n("Enter password for %1").arg(admincreds.username));
if (result == KPasswordDialog::Accepted) {
admincreds.password = password;
admincreds.password = password.utf8();
admincreds.use_gssapi = false;
}
}
@ -1699,7 +1699,7 @@ int LDAPManager::getKerberosPassword(LDAPCredentials &creds, TQString prompt, bo
const int ret = passdlg.exec();
if (ret == KDialog::Accepted) {
creds.username = passdlg.m_base->ldapAdminUsername->text();
creds.password = passdlg.m_base->ldapAdminPassword->password();
creds.password = passdlg.m_base->ldapAdminPassword->password().utf8();
creds.realm = passdlg.m_base->ldapAdminRealm->currentText();
creds.service = passdlg.m_base->kerberosServicePrincipal->text();
creds.use_tls = passdlg.m_base->ldapUseTLS->isOn();
@ -1783,10 +1783,10 @@ int LDAPManager::obtainKerberosTicket(LDAPCredentials creds, TQString principal,
prompt = prompt.stripWhiteSpace();
while (prompt.endsWith(" Password:") || (creds.use_smartcard && prompt.contains("PIN"))) {
if (creds.use_smartcard) {
TQCString password;
TQString password;
int result = KPasswordDialog::getPassword(password, prompt);
if (result == KPasswordDialog::Accepted) {
creds.password = password;
creds.password = password.utf8();
}
else {
return 0;
@ -3646,7 +3646,7 @@ int LDAPManager::setLDAPMasterReplicationSettings(LDAPMasterReplicationInfo repl
passdlg.m_base->ldapAdminUsername->setEnabled(false);
passdlg.m_base->ldapAdminUsername->setText(replicationinfo.syncDN);
if (passdlg.exec() == TQDialog::Accepted) {
replicationinfo.syncPassword = passdlg.m_base->ldapAdminPassword->password();
replicationinfo.syncPassword = passdlg.m_base->ldapAdminPassword->password().utf8();
}
}

Loading…
Cancel
Save