summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/cryptography/kgpginterface.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2018-12-01 23:39:45 +0900
committerMichele Calgaro <[email protected]>2018-12-01 23:39:45 +0900
commit53fe3bf43aeb43f51f6b6ebb7453938e85c0223b (patch)
treed63838d4442041515669c84a02700bbca9f1aa77 /kopete/plugins/cryptography/kgpginterface.cpp
parentca937b0c3ebc76d1a079e5d4b22022c4ccb29889 (diff)
downloadtdenetwork-53fe3bf43aeb43f51f6b6ebb7453938e85c0223b.tar.gz
tdenetwork-53fe3bf43aeb43f51f6b6ebb7453938e85c0223b.zip
Adapted to new KPasswordEdit::password() signature. This relates to bug 2961.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kopete/plugins/cryptography/kgpginterface.cpp')
-rw-r--r--kopete/plugins/cryptography/kgpginterface.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/kopete/plugins/cryptography/kgpginterface.cpp b/kopete/plugins/cryptography/kgpginterface.cpp
index 5763e910..79cd2510 100644
--- a/kopete/plugins/cryptography/kgpginterface.cpp
+++ b/kopete/plugins/cryptography/kgpginterface.cpp
@@ -85,7 +85,7 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
char buffer[200];
int counter=0,ppass[2];
- TQCString password = CryptographyPlugin::cachedPass();
+ TQString password = CryptographyPlugin::cachedPass();
bool passphraseHandling=CryptographyPlugin::passphraseHandling();
while ((counter<3) && (encResult.isEmpty()))
@@ -111,7 +111,8 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
{
pipe(ppass);
pass = fdopen(ppass[1], "w");
- fwrite(password, sizeof(char), strlen(password), pass);
+ TQCString pass2 = password.local8Bit();
+ fwrite(pass2, sizeof(char), pass2.length(), pass);
// fwrite("\n", sizeof(char), 1, pass);
fclose(pass);
}
@@ -129,7 +130,7 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
encResult += TQString::fromUtf8(buffer);
pclose(fp);
- password = TQCString();
+ password.fill(' ');
}
if( !encResult.isEmpty() )