diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2018-12-02 16:37:23 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2018-12-02 16:37:23 +0900 |
commit | e58aec2eb28d96e1786254a0209c72f8a43218a5 (patch) | |
tree | d78298b6b86c343bb1cae25a08a55775a88dfbf1 | |
parent | 22434b27076b6cfb66da2e0342e4c07dd57bfa4a (diff) | |
download | kmymoney-e58aec2eb28d96e1786254a0209c72f8a43218a5.tar.gz kmymoney-e58aec2eb28d96e1786254a0209c72f8a43218a5.zip |
Adapted to new KPasswordEdit::password() signature. This relates to bug 2961.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r-- | libkgpgfile/kgpgfile.cpp | 9 | ||||
-rw-r--r-- | libkgpgfile/kgpgfile.h | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/libkgpgfile/kgpgfile.cpp b/libkgpgfile/kgpgfile.cpp index 07aa319..baa95b1 100644 --- a/libkgpgfile/kgpgfile.cpp +++ b/libkgpgfile/kgpgfile.cpp @@ -180,7 +180,7 @@ bool KGPGFile::open(int mode, const TQString& cmdArgs, bool skipPasswd) args = TQStringList::split(" ", cmdArgs); } - TQCString pwd; + TQString pwd; if(isReadable() && useOwnPassphrase && !skipPasswd) { KPasswordDialog dlg(KPasswordDialog::Password,false,0); dlg.setPrompt(i18n("Enter passphrase")); @@ -188,7 +188,7 @@ bool KGPGFile::open(int mode, const TQString& cmdArgs, bool skipPasswd) dlg.adjustSize(); if (dlg.exec() == TQDialog::Rejected) return false; - pwd = TQCString(dlg.password()); + pwd = dlg.password(); } // tqDebug("starting GPG process"); @@ -209,8 +209,9 @@ bool KGPGFile::open(int mode, const TQString& cmdArgs, bool skipPasswd) } if(isReadable() && useOwnPassphrase && !skipPasswd) { - // tqDebug("Passphrase is '%s'", pwd.data()); - if(_writeBlock(pwd.data(), pwd.length()) == -1) { + TQCString pwd2 = pwd.local8Bit(); // Local 8 bit length can be different from TQString length + // tqDebug("Passphrase is '%s'", pwd2.data()); + if(_writeBlock(pwd2.data(), pwd2.length()) == -1) { // tqDebug("Sending passphrase failed"); return false; } diff --git a/libkgpgfile/kgpgfile.h b/libkgpgfile/kgpgfile.h index ab28968..79887aa 100644 --- a/libkgpgfile/kgpgfile.h +++ b/libkgpgfile/kgpgfile.h @@ -45,7 +45,7 @@ class TDEProcess; * * +------------------+ write +-----------+ stdin +-------+ +--------+ * | |--------->|\ |---------->| |---->| | - * | Application code | read | TQFile | stdout | GPG | | File | + * | Application code | read | TQFile | stdout | GPG | | File | * | |<---------|/ |<----------| |<----| | * +------------------+ | KGPGFile | +-------+ +--------+ * | control| | |