diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2018-11-30 11:26:25 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2018-11-30 11:26:25 +0900 |
commit | 580ffcad3885e5d24e98a9dffe4962654753136e (patch) | |
tree | d9019fe61ba9d77465eed215e3aa607772d76d39 /kgpg | |
parent | 1d93eb1e7a39aae33ed852b61b490882e101432e (diff) | |
download | tdeutils-580ffcad3885e5d24e98a9dffe4962654753136e.tar.gz tdeutils-580ffcad3885e5d24e98a9dffe4962654753136e.zip |
Adapted to new KPasswordEdit::password() signature. This relates to bug 2961.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kgpg')
-rw-r--r-- | kgpg/kgpginterface.cpp | 33 | ||||
-rw-r--r-- | kgpg/listkeys.cpp | 6 |
2 files changed, 20 insertions, 19 deletions
diff --git a/kgpg/kgpginterface.cpp b/kgpg/kgpginterface.cpp index 0d15df2..9fb5cca 100644 --- a/kgpg/kgpginterface.cpp +++ b/kgpg/kgpginterface.cpp @@ -149,7 +149,7 @@ void KgpgInterface::readencprocess(KProcIO *p) if (required.find("openfile.overwrite.okay")!=-1) p->writeStdin(TQString("Yes")); else if ((required.find("passphrase.enter")!=-1)) { - TQCString passphrase; + TQString passphrase; int code=KPasswordDialog::getNewPassword(passphrase,i18n("Enter passphrase for your file (symmetrical encryption):")); if (code!=TQDialog::Accepted) { p->deleteLater(); @@ -226,7 +226,7 @@ void KgpgInterface::readdecprocess(KProcIO *p) if (userIDs.isEmpty()) userIDs=i18n("[No user id found]"); userIDs.replace(TQRegExp("<"),"<"); - TQCString passphrase; + TQString passphrase; TQString passdlgmessage; if (anonymous) passdlgmessage=i18n("<b>No user id found</b>. Trying all secret keys.<br>"); @@ -313,7 +313,7 @@ void KgpgInterface::txtreadencprocess(KProcIO *p) else if ((required.find("passphrase.enter")!=-1)) { - TQCString passphrase; + TQString passphrase; TQString passdlgmessage=i18n("Enter passphrase (symmetrical encryption)"); int code=KPasswordDialog::getNewPassword(passphrase,passdlgmessage); if (code!=TQDialog::Accepted) @@ -409,7 +409,7 @@ void KgpgInterface::getCmdOutput(TDEProcess *p, char *data, int ) { if (userIDs.isEmpty()) userIDs=i18n("[No user id found]"); - TQCString passphrase; + TQString passphrase; TQString passdlgmessage; if (anonymous) passdlgmessage=i18n("<b>No user id found</b>. Trying all secret keys.<br>"); @@ -424,7 +424,8 @@ void KgpgInterface::getCmdOutput(TDEProcess *p, char *data, int ) return; } passphrase.append("\n"); - p->writeStdin(passphrase,passphrase.length()); + TQCString passphrase_local = passphrase.local8Bit(); + p->writeStdin(passphrase_local, passphrase_local.length()); userIDs=TQString(); if (step>1) step--; else step=3; @@ -527,7 +528,7 @@ void KgpgInterface::txtsignprocess(KProcIO *p) else step=3; if (userIDs.isEmpty()) userIDs=i18n("[No user id found]"); - TQCString passphrase; + TQString passphrase; TQString passdlgmessage; if (step<3) passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").arg(step); @@ -776,7 +777,7 @@ void KgpgInterface::readsignprocess(KProcIO *p) else if ((required.find("passphrase.enter")!=-1)) { if (userIDs.isEmpty()) userIDs=i18n("[No user id found]"); - TQCString passphrase; + TQString passphrase; TQString passdlgmessage; if (step<3) passdlgmessage=i18n("<b>Bad passphrase</b>. you have %1 tries left.<br>").arg(step); @@ -958,7 +959,7 @@ void KgpgInterface::sigprocess(KProcIO *p) } if (required.find("passphrase.enter")!=-1) { - TQCString signpass; + TQString signpass; // kdDebug(2100) << k_funcinfo << "passphrase.enter" << endl; TQApplication::restoreOverrideCursor(); int code=KPasswordDialog::getPassword(signpass,i18n("<qt>%1 Enter passphrase for <b>%2</b>:</qt>") @@ -1040,7 +1041,7 @@ void KgpgInterface::sigprocess(KProcIO *p) if (required.find("passphrase.enter")!=-1) { TQApplication::restoreOverrideCursor(); - TQCString signpass; + TQString signpass; // kdDebug(2100) << k_funcinfo << "passphrase.enter" << endl; int code=KPasswordDialog::getPassword(signpass,i18n("<qt>%1 Enter passphrase for <b>%2</b>:</qt>") .arg(errMessage).arg(userIDs)); @@ -1269,7 +1270,7 @@ void KgpgInterface::expprocess(KProcIO *p) } if (required.find("passphrase.enter")!=-1) { - TQCString signpass; + TQString signpass; int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs)); if (code!=TQDialog::Accepted) { expSuccess=3; ///// aborted by user mode @@ -1438,7 +1439,7 @@ void KgpgInterface::passprocess(KProcIO *p) userIDs.replace(TQRegExp("<"),"<"); if (step==1) { - TQCString passphrase; + TQString passphrase; int code=KPasswordDialog::getPassword(passphrase,i18n("<qt>%1 Enter passphrase for <b>%2</b></qt>") .arg(message).arg(userIDs)); if (code!=TQDialog::Accepted) { @@ -1453,7 +1454,7 @@ void KgpgInterface::passprocess(KProcIO *p) } if (step==3) { - TQCString passphrase; + TQString passphrase; int code=KPasswordDialog::getNewPassword(passphrase,i18n("<qt>Enter new passphrase for <b>%1</b><br>If you forget this passphrase, all your encrypted files and messages will be lost !<br></qt>").arg(userIDs)); if (code!=TQDialog::Accepted) { step=4; @@ -1689,7 +1690,7 @@ void KgpgInterface::adduidprocess(KProcIO *p) } if (required.find("passphrase.enter")!=-1) { - TQCString delpass; + TQString delpass; int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>") .arg(userIDs)); if (code!=TQDialog::Accepted) { @@ -1819,7 +1820,7 @@ void KgpgInterface::delphotoprocess(KProcIO *p) } if (required.find("passphrase.enter")!=-1) { - TQCString delpass; + TQString delpass; int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs)); if (code!=TQDialog::Accepted) { //deleteSuccess=false; @@ -1897,7 +1898,7 @@ void KgpgInterface::addphotoprocess(KProcIO *p) } if (required.find("passphrase.enter")!=-1) { - TQCString delpass; + TQString delpass; int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs)); if (code!=TQDialog::Accepted) { //deleteSuccess=false; @@ -1991,7 +1992,7 @@ void KgpgInterface::revokeprocess(KProcIO *p) if (required.find("passphrase.enter")!=-1) { // kdDebug(2100) << k_funcinfo << " passphrase.enter " << endl; - TQCString signpass; + TQString signpass; int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs)); if (code!=TQDialog::Accepted) { expSuccess=3; ///// aborted by user mode diff --git a/kgpg/listkeys.cpp b/kgpg/listkeys.cpp index 2c75853..ed1d7dc 100644 --- a/kgpg/listkeys.cpp +++ b/kgpg/listkeys.cpp @@ -2223,7 +2223,7 @@ void listKeys::slotgenkey() delete genkey; //genkey->delayedDestruct(); - TQCString password; + TQString password; bool goodpass=false; while (!goodpass) { @@ -2231,7 +2231,7 @@ void listKeys::slotgenkey() if (code!=TQDialog::Accepted) return; if (password.length()<5) - KMessageBox::sorry(this,i18n("This passphrase is not secure enough.\nMinimum length= 5 characters")); + KMessageBox::sorry(this,i18n("This passphrase is not secure enough.\nMinimum length = 5 characters")); else goodpass=true; } @@ -2283,7 +2283,7 @@ void listKeys::slotgenkey() proc->writeStdin(TQString("Subkey-Type: ELG-E")); proc->writeStdin(TQString("Subkey-Length:%1").arg(ksize)); } - proc->writeStdin(TQString("Passphrase:%1").arg(password.data())); + proc->writeStdin(TQString("Passphrase:%1").arg(password)); proc->writeStdin(TQString("Key-Length:%1").arg(ksize)); proc->writeStdin(TQString("Name-Real:%1").arg(newKeyName)); if (!newKeyMail.isEmpty()) |