mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
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
This commit is contained in:
parent
2a11f0baa3
commit
69144b0baa
1 changed files with 6 additions and 14 deletions
|
|
@ -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");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue