summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2016-10-19 07:07:08 (GMT)
committerRolf Eike Beer <kde@opensource.sf-tec.de>2016-10-19 17:36:33 (GMT)
commit4bf291cdbc7081cc8af728cda9653ea57edc38dd (patch)
tree8fd92475673b4452f373656a2d2bb3fa3a38c12f
parenta473a43dd26a10ef49f7624c5bce2ea0665af250 (diff)
fix wrong sender checks
This class is a QObject itself now, so the own sender() method needs to be used.
-rw-r--r--transactions/kgpgtransactionprivate.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/transactions/kgpgtransactionprivate.cpp b/transactions/kgpgtransactionprivate.cpp
index 87e0509..6cd5ad7 100644
--- a/transactions/kgpgtransactionprivate.cpp
+++ b/transactions/kgpgtransactionprivate.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009,2010,2012,2014 Rolf Eike Beer <kde@opensource.sf-tec.de>
+ * Copyright (C) 2009,2010,2012,2014,2016 Rolf Eike Beer <kde@opensource.sf-tec.de>
*/
/***************************************************************************
@@ -253,7 +253,7 @@ KGpgTransactionPrivate::slotPassphraseEntered(const QString &passphrase)
{
// not calling KGpgTransactionPrivate::write() here for obvious privacy reasons
m_process->write(passphrase.toUtf8() + '\n');
- if (m_parent->sender() == m_newPasswordDialog) {
+ if (sender() == m_newPasswordDialog) {
m_newPasswordDialog->deleteLater();
m_newPasswordDialog = Q_NULLPTR;
m_parent->newPassphraseEntered();
@@ -265,8 +265,8 @@ KGpgTransactionPrivate::slotPassphraseEntered(const QString &passphrase)
void
KGpgTransactionPrivate::slotPassphraseAborted()
{
- Q_ASSERT((m_parent->sender() == m_passwordDialog) ^ (m_parent->sender() == m_newPasswordDialog));
- m_parent->sender()->deleteLater();
+ Q_ASSERT((sender() == m_passwordDialog) ^ (sender() == m_newPasswordDialog));
+ sender()->deleteLater();
m_newPasswordDialog = Q_NULLPTR;
m_passwordDialog = Q_NULLPTR;
handlePassphraseAborted();