Commit 4bf291cd authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Rolf Eike Beer
Browse files

fix wrong sender checks

This class is a QObject itself now, so the own sender() method needs to be used.
parent a473a43d
/*
* 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();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment