mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-07-26 14:24:45 +00:00
[dialer] Cleanup the debug output and make it more useful
This commit is contained in:
parent
e1f27cebb0
commit
fe7b3f36b0
1 changed files with 5 additions and 7 deletions
|
|
@ -46,11 +46,12 @@ TpCaller::TpCaller(QObject *parent)
|
||||||
m_simAccount = Tp::Account::create(TP_QT_ACCOUNT_MANAGER_BUS_NAME, QStringLiteral("/org/freedesktop/Telepathy/Account/ofono/ofono/account0"), connectionFactory, channelFactory);
|
m_simAccount = Tp::Account::create(TP_QT_ACCOUNT_MANAGER_BUS_NAME, QStringLiteral("/org/freedesktop/Telepathy/Account/ofono/ofono/account0"), connectionFactory, channelFactory);
|
||||||
Tp::PendingReady *op = m_simAccount->becomeReady(Tp::Features() << Tp::Account::FeatureCore);
|
Tp::PendingReady *op = m_simAccount->becomeReady(Tp::Features() << Tp::Account::FeatureCore);
|
||||||
|
|
||||||
qDebug() << "Calling becomeReady on account" << m_simAccount->isValid();
|
|
||||||
|
|
||||||
connect(op, &Tp::PendingOperation::finished, [=](){
|
connect(op, &Tp::PendingOperation::finished, [=](){
|
||||||
qDebug() << "account ready";
|
if (op->isError()) {
|
||||||
qDebug() << "is error" << op->isError();
|
qWarning() << "SIM card account failed to get ready:" << op->errorMessage();
|
||||||
|
} else {
|
||||||
|
qDebug() << "SIM Account ready to use";
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -82,10 +83,8 @@ bool TpCaller::callInProgress()
|
||||||
return m_callChannel && m_callChannel->isValid() && m_callChannel->connection();
|
return m_callChannel && m_callChannel->isValid() && m_callChannel->connection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TpCaller::hangUp()
|
void TpCaller::hangUp()
|
||||||
{
|
{
|
||||||
qDebug() << "About to hangup" << m_callChannel << m_callChannel->isValid() << m_callChannel->connection();
|
|
||||||
if (m_callChannel && m_callChannel->isValid() && m_callChannel->connection()) {
|
if (m_callChannel && m_callChannel->isValid() && m_callChannel->connection()) {
|
||||||
qDebug() << "Hanging up";
|
qDebug() << "Hanging up";
|
||||||
Tp::PendingOperation *op = m_callChannel->hangup();
|
Tp::PendingOperation *op = m_callChannel->hangup();
|
||||||
|
|
@ -93,7 +92,6 @@ void TpCaller::hangUp()
|
||||||
if (op->isError()) {
|
if (op->isError()) {
|
||||||
qWarning() << "Unable to hang up:" << op->errorMessage();
|
qWarning() << "Unable to hang up:" << op->errorMessage();
|
||||||
}
|
}
|
||||||
qDebug() << "Channel close request complete";
|
|
||||||
m_callChannel->requestClose();
|
m_callChannel->requestClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue