From 2e5de46030e2354b851ba731f6c76ac30a2e8a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 29 Nov 2018 19:52:17 +0100 Subject: Adapted to new KPasswordEdit::password() signature. This relates to bug 2961. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- certmanager/lib/backends/qgpgme/qgpgmejob.cpp | 2 +- certmanager/lib/ui/passphrasedialog.cpp | 5 ++--- certmanager/lib/ui/passphrasedialog.h | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'certmanager') diff --git a/certmanager/lib/backends/qgpgme/qgpgmejob.cpp b/certmanager/lib/backends/qgpgme/qgpgmejob.cpp index 7f08aa29b..947a52587 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmejob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmejob.cpp @@ -301,5 +301,5 @@ char * Kleo::QGpgMEJob::getPassphrase( const char * useridHint, const char * /*d } canceled = false; // gpgme++ free()s it, and we need to copy as long as dlg isn't deleted :o - return strdup( dlg.passphrase() ); + return strdup( dlg.passphrase().utf8() ); } diff --git a/certmanager/lib/ui/passphrasedialog.cpp b/certmanager/lib/ui/passphrasedialog.cpp index a2d0e7c36..e9f1e3e98 100644 --- a/certmanager/lib/ui/passphrasedialog.cpp +++ b/certmanager/lib/ui/passphrasedialog.cpp @@ -100,13 +100,12 @@ Kleo::PassphraseDialog::~PassphraseDialog() { delete d; d = 0; } -const char * Kleo::PassphraseDialog::passphrase() const { +const TQString Kleo::PassphraseDialog::passphrase() const { return d->lineedit->password(); } void Kleo::PassphraseDialog::slotOk() { - const char * pass = passphrase(); - emit finished( pass ? pass : "" ); + emit finished( passphrase() ); KDialogBase::slotOk(); } diff --git a/certmanager/lib/ui/passphrasedialog.h b/certmanager/lib/ui/passphrasedialog.h index e83eca422..2416f811b 100644 --- a/certmanager/lib/ui/passphrasedialog.h +++ b/certmanager/lib/ui/passphrasedialog.h @@ -63,13 +63,13 @@ namespace Kleo { bool modal=true ); ~PassphraseDialog(); - const char * passphrase() const; + const TQString passphrase() const; signals: /** emitted when the user clicks Ok. \a pass is never NULL. \c pass only valid inside slots connected to this signal. */ - void finished( const char * pass ); + void finished( const TQString pass ); /** emitted when the user clicks Cancel. */ void canceled(); -- cgit v1.2.1