From 69144b0baa6249ba0466f624c3d00f7106df7560 Mon Sep 17 00:00:00 2001 From: Bhushan Shah Date: Fri, 13 Sep 2019 17:16:51 +0530 Subject: [PATCH] dialer: use the number directly instead of checking contactManager There's existing todo item to make it use the kpeople instead of telepathy contact manager, no need to deal with telepathy contact manager, in some setups it causes crasher. See: !22 --- dialer/src/dialerutils.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/dialer/src/dialerutils.cpp b/dialer/src/dialerutils.cpp index 0a770944..43743212 100644 --- a/dialer/src/dialerutils.cpp +++ b/dialer/src/dialerutils.cpp @@ -55,21 +55,13 @@ DialerUtils::~DialerUtils() void DialerUtils::dial(const QString &number) { // FIXME: this should be replaced by kpeople thing - auto pendingContact = m_simAccount->connection()->contactManager()->contactsForIdentifiers(QStringList() << number); - - connect(pendingContact, &Tp::PendingOperation::finished, [=](){ - if (pendingContact->contacts().size() < 1) { - qWarning() << " no contacts"; - return; + qDebug() << "Starting call..."; + Tp::PendingChannelRequest *pendingChannel = m_simAccount->ensureAudioCall(number); + connect(pendingChannel, &Tp::PendingChannelRequest::finished, [=](){ + if (pendingChannel->isError()) { + qWarning() << "Error when requesting channel" << pendingChannel->errorMessage(); + setCallState("failed"); } - qDebug() << "Starting call..."; - Tp::PendingChannelRequest *pendingChannel = m_simAccount->ensureAudioCall(pendingContact->contacts().first()); - connect(pendingChannel, &Tp::PendingChannelRequest::finished, [=](){ - if (pendingChannel->isError()) { - qWarning() << "Error when requesting channel" << pendingChannel->errorMessage(); - setCallState("failed"); - } - }); }); }