[dialer] Add basic call failures handler

This commit is contained in:
Martin Klapetek 2015-06-29 18:18:27 +02:00
parent e528b41780
commit b7b6691c19
2 changed files with 19 additions and 0 deletions

View file

@ -35,6 +35,24 @@ Item {
status.text = status.text + number
}
Rectangle {
width: parent.width / 2
x: parent.width / 4
y: parent.height - callStatusNotification.paintedHeight
color: PlasmaCore.ColorScope.backgroundColor
opacity: 0.6
visible: dialerUtils.callState == "failing"
PlasmaComponents.Label {
id: callStatusNotification
anchors.fill: parent
text: "Unable to make a call at this moment"
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
color: PlasmaCore.ColorScope.textColor
}
}
ColumnLayout {
id: dialPadArea

View file

@ -66,6 +66,7 @@ void DialerUtils::dial(const QString &number)
connect(pendingChannel, &Tp::PendingChannelRequest::finished, [=](){
if (pendingChannel->isError()) {
qWarning() << "Error when requesting channel" << pendingChannel->errorMessage();
setCallState("failed");
}
});
});