summaryrefslogtreecommitdiffstats
path: root/kcontrol
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2018-11-28 00:04:05 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2018-11-28 00:04:05 +0900
commit6ae10fc66ed3c35e98e49bac8bf6670f0a9e2d6b (patch)
tree154aa555033fe887b9b56d8a559000c89b166f1e /kcontrol
parent3c2da5f0e188e1f1152da840bdf8d94ceb509671 (diff)
downloadtdebase-6ae10fc66ed3c35e98e49bac8bf6670f0a9e2d6b.tar.gz
tdebase-6ae10fc66ed3c35e98e49bac8bf6670f0a9e2d6b.zip
Adapted to new KPasswordEdit::password() signature. This relates to bug 2961.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kcontrol')
-rw-r--r--kcontrol/crypto/crypto.cpp18
-rw-r--r--kcontrol/dnssd/kcmdnssd.cpp2
-rw-r--r--kcontrol/hwmanager/cryptpassworddlg.cpp5
-rw-r--r--kcontrol/hwmanager/hwmanager.cpp2
4 files changed, 14 insertions, 13 deletions
diff --git a/kcontrol/crypto/crypto.cpp b/kcontrol/crypto/crypto.cpp
index 55536b21e..f8558c866 100644
--- a/kcontrol/crypto/crypto.cpp
+++ b/kcontrol/crypto/crypto.cpp
@@ -1620,13 +1620,13 @@ void KCryptoConfig::slotYourImport() {
#ifdef HAVE_SSL
KSSLPKCS12 *cert = NULL;
-TQCString pass;
+TQString pass;
TryImportPassAgain:
int rc = KPasswordDialog::getPassword(pass, i18n("Certificate password"));
if (rc != KPasswordDialog::Accepted) return;
- cert = KSSLPKCS12::loadCertFile(certFile, TQString(pass));
+ cert = KSSLPKCS12::loadCertFile(certFile, pass);
if (!cert) {
rc = KMessageBox::warningYesNo(this, i18n("The certificate file could not be loaded. Try a different password?"), i18n("SSL"),i18n("Try"),i18n("Do Not Try"));
@@ -1681,7 +1681,7 @@ YourCertItem *x = static_cast<YourCertItem *>(yourSSLBox->selectedItem());
pkcs = KSSLPKCS12::fromString(x->getPKCS(), x->getPassCache());
if (!pkcs) {
TQString pprompt = i18n("Enter the certificate password:");
- TQCString oldpass;
+ TQString oldpass;
do {
int i = KPasswordDialog::getPassword(oldpass, pprompt);
if (i != KPasswordDialog::Accepted) return;
@@ -1713,7 +1713,7 @@ TQString iss;
pkcs = KSSLPKCS12::fromString(x->getPKCS(), x->getPassCache());
if (!pkcs) {
TQString pprompt = i18n("Enter the certificate password:");
- TQCString oldpass;
+ TQString oldpass;
do {
int i = KPasswordDialog::getPassword(oldpass, pprompt);
if (i != KPasswordDialog::Accepted) return;
@@ -1761,7 +1761,7 @@ TQString iss;
pkcs = KSSLPKCS12::fromString(x->getPKCS(), x->getPassCache());
if (!pkcs) {
TQString pprompt = i18n("Enter the certificate password:");
- TQCString oldpass;
+ TQString oldpass;
do {
int i = KPasswordDialog::getPassword(oldpass, pprompt);
if (i != KPasswordDialog::Accepted) return;
@@ -1851,8 +1851,8 @@ TQString iss;
void KCryptoConfig::slotYourPass() {
-YourCertItem *x = static_cast<YourCertItem *>(yourSSLBox->selectedItem());
-TQCString oldpass = "";
+ YourCertItem *x = static_cast<YourCertItem *>(yourSSLBox->selectedItem());
+ TQString oldpass = "";
if (!x) return;
KSSLPKCS12 *pkcs = KSSLPKCS12::fromString(x->getPKCS(), x->getPass());
@@ -1877,8 +1877,8 @@ TQCString oldpass = "";
int i = kpd->exec();
if (i == KPasswordDialog::Accepted) {
- TQCString pass = kpd->password();
- pkcs->changePassword(TQString(oldpass), TQString(pass));
+ TQString pass = kpd->password();
+ pkcs->changePassword(oldpass, pass);
x->setPKCS(pkcs->toString());
x->setPassCache(pass);
configChanged();
diff --git a/kcontrol/dnssd/kcmdnssd.cpp b/kcontrol/dnssd/kcmdnssd.cpp
index 65992bb09..d1fe3269c 100644
--- a/kcontrol/dnssd/kcmdnssd.cpp
+++ b/kcontrol/dnssd/kcmdnssd.cpp
@@ -169,7 +169,7 @@ bool KCMDnssd::saveMdnsd()
{
mdnsdLines["zone"]=domainedit->text();
mdnsdLines["hostname"]=hostedit->text();
- if (!secretedit->text().isEmpty()) mdnsdLines["secret-64"]=TQString(secretedit->password());
+ if (!secretedit->text().isEmpty()) mdnsdLines["secret-64"]=secretedit->password();
else mdnsdLines.remove("secret-64");
TQFile f(MDNSD_CONF);
bool newfile=!f.exists();
diff --git a/kcontrol/hwmanager/cryptpassworddlg.cpp b/kcontrol/hwmanager/cryptpassworddlg.cpp
index 1d66d89c1..b0f0e1cd8 100644
--- a/kcontrol/hwmanager/cryptpassworddlg.cpp
+++ b/kcontrol/hwmanager/cryptpassworddlg.cpp
@@ -90,7 +90,8 @@ CryptPasswordDialog::~CryptPasswordDialog()
TQByteArray CryptPasswordDialog::password() {
if (m_base->textPasswordButton->isOn() == true) {
- m_password.duplicate(m_base->textPasswordEntry->password(), strlen(m_base->textPasswordEntry->password()));
+ TQCString pass = m_base->textPasswordEntry->password().utf8();
+ m_password.duplicate(pass, pass.length());
if (m_useCard) *m_useCard = false;
}
else if (m_base->filePasswordButton->isOn() == true) {
@@ -109,7 +110,7 @@ void CryptPasswordDialog::processLockouts() {
m_base->textPasswordEntry->setEnabled(true);
m_base->filePasswordURL->setEnabled(false);
m_base->textPasswordEntry->setFocus();
- if (strlen(m_base->textPasswordEntry->password()) > 0) {
+ if (m_base->textPasswordEntry->password().length() > 0) {
enableButtonOK(true);
}
else {
diff --git a/kcontrol/hwmanager/hwmanager.cpp b/kcontrol/hwmanager/hwmanager.cpp
index 1cd8b04e0..5a5fb3e99 100644
--- a/kcontrol/hwmanager/hwmanager.cpp
+++ b/kcontrol/hwmanager/hwmanager.cpp
@@ -229,7 +229,7 @@ void TDEHWManager::deviceChanged(TDEGenericDevice* device) {
}
void TDEHWManager::cryptographicCardPinRequested(TQString prompt, TDECryptographicCardDevice* cdevice) {
- TQCString password;
+ TQString password;
int result = KPasswordDialog::getPassword(password, prompt);
if (result == KPasswordDialog::Accepted) {
cdevice->setProvidedPin(password);