From eb176a4099ecd88a607ff5fce607b2ce6abb1317 Mon Sep 17 00:00:00 2001 From: Martin Klapetek Date: Thu, 18 Jun 2015 14:41:03 +0000 Subject: [PATCH] [dialer] Cast the Channel to CallChannel and call hangup on it That seems to actually hang up the call --- dialer/plugin/tp-caller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dialer/plugin/tp-caller.cpp b/dialer/plugin/tp-caller.cpp index ff6251e2..b59940f8 100644 --- a/dialer/plugin/tp-caller.cpp +++ b/dialer/plugin/tp-caller.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -88,7 +89,7 @@ void TpCaller::hangUp() qDebug() << "About to hangup" << m_callChannel << m_callChannel->isValid() << m_callChannel->connection(); if (m_callChannel && m_callChannel->isValid() && m_callChannel->connection()) { qDebug() << "Hanging up"; - Tp::PendingOperation *op = m_callChannel->requestClose(); + Tp::PendingOperation *op = qobject_cast(m_callChannel.data())->hangup(); connect(op, &Tp::PendingOperation::finished, [=]() { if (op->isError()) { qWarning() << "Unable to hang up:" << op->errorMessage();