summaryrefslogtreecommitdiffstats
path: root/kcontrol
diff options
context:
space:
mode:
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);