From 13000110ca06bf2a3bf3d105ca32e0d07e2357cb Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Tue, 23 May 2017 12:07:57 +0200 Subject: [PATCH] feat(ui/views/App/Calls/ConferenceManager): in progress --- linphone-desktop/src/components/call/CallModel.hpp | 11 +++++------ .../src/components/calls/CallsListProxyModel.cpp | 4 +--- linphone-desktop/ui/modules/Common/Window/Window.js | 5 ++++- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/linphone-desktop/src/components/call/CallModel.hpp b/linphone-desktop/src/components/call/CallModel.hpp index a5816d621..957e39ae7 100644 --- a/linphone-desktop/src/components/call/CallModel.hpp +++ b/linphone-desktop/src/components/call/CallModel.hpp @@ -25,7 +25,7 @@ #include #include -#include + // ============================================================================= class CallModel : public QObject { @@ -76,6 +76,10 @@ public: QString getSipAddress () const; + bool isInConference () const { + return mIsInConference; + } + static void setRecordFile (std::shared_ptr &callParams); void updateStats (const std::shared_ptr &callStats); @@ -114,11 +118,6 @@ private: return mCall->getDir() == linphone::CallDirOutgoing; } - bool isInConference () const { - qDebug() << "toto" << mIsInConference; - return mIsInConference; - } - void updateIsInConference (); void acceptWithAutoAnswerDelay (); diff --git a/linphone-desktop/src/components/calls/CallsListProxyModel.cpp b/linphone-desktop/src/components/calls/CallsListProxyModel.cpp index 29ca35150..d951e32dd 100644 --- a/linphone-desktop/src/components/calls/CallsListProxyModel.cpp +++ b/linphone-desktop/src/components/calls/CallsListProxyModel.cpp @@ -43,7 +43,5 @@ CallsListProxyModel::CallsListProxyModel (QObject *parent) : QSortFilterProxyMod bool CallsListProxyModel::filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const { const QModelIndex &index = sourceModel()->index(sourceRow, 0, sourceParent); - shared_ptr call = index.data().value()->getCall(); - - return call->getConference() == nullptr; + return !index.data().value()->isInConference(); } diff --git a/linphone-desktop/ui/modules/Common/Window/Window.js b/linphone-desktop/ui/modules/Common/Window/Window.js index 4021281fa..b3eb80804 100644 --- a/linphone-desktop/ui/modules/Common/Window/Window.js +++ b/linphone-desktop/ui/modules/Common/Window/Window.js @@ -24,7 +24,10 @@ function attachVirtualWindow (component, properties, exitStatusHandler) { object.exitStatus.connect(exitStatusHandler) } object.exitStatus.connect(function () { - virtualWindow.unsetContent().destroy() + var content = virtualWindow.unsetContent() + if (content) { + content.destroy() + } }) virtualWindow.setContent(object)