From 75c11911acb6497e631b807edeca6d0af1aefa9d Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Wed, 19 Apr 2017 11:05:38 +0200 Subject: [PATCH] fix(app): many changes --- linphone-desktop/src/Utils.cpp | 2 +- .../src/components/call/CallModel.cpp | 38 +++++++++---------- .../src/components/call/CallModel.hpp | 2 + .../ui/modules/Linphone/Calls/Calls.js | 4 +- .../ui/views/App/Calls/Incall.qml | 12 ++++-- 5 files changed, 32 insertions(+), 26 deletions(-) diff --git a/linphone-desktop/src/Utils.cpp b/linphone-desktop/src/Utils.cpp index 637b348a0..a5acd2831 100644 --- a/linphone-desktop/src/Utils.cpp +++ b/linphone-desktop/src/Utils.cpp @@ -20,7 +20,7 @@ * Author: Ronan Abhamon */ - #include "utils.hpp" + #include "Utils.hpp" // ============================================================================= diff --git a/linphone-desktop/src/components/call/CallModel.cpp b/linphone-desktop/src/components/call/CallModel.cpp index 19033635f..cd84bc43d 100644 --- a/linphone-desktop/src/components/call/CallModel.cpp +++ b/linphone-desktop/src/components/call/CallModel.cpp @@ -426,25 +426,6 @@ inline QVariantMap createStat (const QString &key, const QString &value) { return m; } -inline QString iceStateToString (linphone::IceState state) const { - switch (state) { - case linphone::IceStateNotActivated: - return tr("iceStateNotActivated"); - case linphone::IceStateFailed: - return tr("iceStateFailed"); - case linphone::IceStateInProgress: - return tr("iceStateInProgress"); - case linphone::IceStateReflexiveConnection: - return tr("iceStateReflexiveConnection"); - case linphone::IceStateHostConnection: - return tr("iceStateHostConnection"); - case linphone::IceStateRelayConnection: - return tr("iceStateRelayConnection"); - default: - return tr("iceStateInvalid"); - } -} - void CallModel::updateStats (const linphone::CallStats &callStats, QVariantList &stats) { QString family; shared_ptr params = mLinphoneCall->getCurrentParams(); @@ -512,3 +493,22 @@ void CallModel::updateStats (const linphone::CallStats &callStats, QVariantList break; } } + +QString CallModel::iceStateToString (linphone::IceState state) const { + switch (state) { + case linphone::IceStateNotActivated: + return tr("iceStateNotActivated"); + case linphone::IceStateFailed: + return tr("iceStateFailed"); + case linphone::IceStateInProgress: + return tr("iceStateInProgress"); + case linphone::IceStateReflexiveConnection: + return tr("iceStateReflexiveConnection"); + case linphone::IceStateHostConnection: + return tr("iceStateHostConnection"); + case linphone::IceStateRelayConnection: + return tr("iceStateRelayConnection"); + default: + return tr("iceStateInvalid"); + } +} diff --git a/linphone-desktop/src/components/call/CallModel.hpp b/linphone-desktop/src/components/call/CallModel.hpp index 27314eeaf..b399021d5 100644 --- a/linphone-desktop/src/components/call/CallModel.hpp +++ b/linphone-desktop/src/components/call/CallModel.hpp @@ -128,6 +128,8 @@ private: QVariantList getVideoStats () const; void updateStats (const linphone::CallStats &callStats, QVariantList &stats); + QString iceStateToString (linphone::IceState state) const; + bool mPausedByRemote = false; bool mPausedByUser = false; bool mRecording = false; diff --git a/linphone-desktop/ui/modules/Linphone/Calls/Calls.js b/linphone-desktop/ui/modules/Linphone/Calls/Calls.js index 367177c67..404583361 100644 --- a/linphone-desktop/ui/modules/Linphone/Calls/Calls.js +++ b/linphone-desktop/ui/modules/Linphone/Calls/Calls.js @@ -16,10 +16,10 @@ var MAP_STATUS_TO_PARAMS = (function () { handler: (function () { call.pausedByUser = true }), name: qsTr('pauseCall') }, { - handler: (function () { call.transfer() }), + handler: call.transfer, name: qsTr('transferCall') }, { - handler: (function () { call.terminate() }), + handler: call.terminate, name: qsTr('terminateCall') }], component: callActions, diff --git a/linphone-desktop/ui/views/App/Calls/Incall.qml b/linphone-desktop/ui/views/App/Calls/Incall.qml index d0b6189f1..45317eb9d 100644 --- a/linphone-desktop/ui/views/App/Calls/Incall.qml +++ b/linphone-desktop/ui/views/App/Calls/Incall.qml @@ -85,12 +85,16 @@ Rectangle { CallStatistics { id: callStatistics + + call: incall.call + + height: container.height + width: container.width + + launcher: callQuality + relativeTo: callQuality relativeY: info.height + elapsedTime.height * 2 - call: incall.call - width: container.width - height: container.height - launcher: callQuality } }