mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
[dialer] Promote the Tp::Channel class var to Tp::CallChannel
This commit is contained in:
parent
eb176a4099
commit
e1f27cebb0
2 changed files with 5 additions and 6 deletions
|
|
@ -25,7 +25,6 @@
|
|||
#include <TelepathyQt/PendingReady>
|
||||
#include <TelepathyQt/PendingContacts>
|
||||
#include <TelepathyQt/TextChannel>
|
||||
#include <TelepathyQt/CallChannel>
|
||||
#include <TelepathyQt/Types>
|
||||
#include <TelepathyQt/ContactManager>
|
||||
|
||||
|
|
@ -72,7 +71,7 @@ void TpCaller::dial(const QString &number)
|
|||
return;
|
||||
}
|
||||
|
||||
m_callChannel = pendingChannel->channel();
|
||||
m_callChannel = Tp::CallChannelPtr(qobject_cast<Tp::CallChannel*>(pendingChannel->channel().data()));
|
||||
Q_EMIT callInProgressChanged();
|
||||
});
|
||||
});
|
||||
|
|
@ -89,13 +88,13 @@ 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 = qobject_cast<Tp::CallChannel*>(m_callChannel.data())->hangup();
|
||||
Tp::PendingOperation *op = m_callChannel->hangup();
|
||||
connect(op, &Tp::PendingOperation::finished, [=]() {
|
||||
if (op->isError()) {
|
||||
qWarning() << "Unable to hang up:" << op->errorMessage();
|
||||
}
|
||||
qDebug() << "Channel close request complete";
|
||||
Q_EMIT callInProgressChanged();
|
||||
m_callChannel->requestClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <QObject>
|
||||
#include <TelepathyQt/Account>
|
||||
#include <TelepathyQt/Channel>
|
||||
#include <TelepathyQt/CallChannel>
|
||||
|
||||
class TpCaller : public QObject
|
||||
{
|
||||
|
|
@ -40,7 +40,7 @@ Q_SIGNALS:
|
|||
|
||||
private:
|
||||
Tp::AccountPtr m_simAccount;
|
||||
Tp::ChannelPtr m_callChannel;
|
||||
Tp::CallChannelPtr m_callChannel;
|
||||
};
|
||||
|
||||
#endif // TPCALLER_H
|
||||
|
|
|
|||
Loading…
Reference in a new issue