- Remove the use processEvents that can lead to a deadlock from iterate.

- Add a loading page while building the call view instead of a blank one.
This commit is contained in:
Julien Wadel 2023-02-07 16:26:17 +01:00
parent 4314354107
commit 6aa57414c0
3 changed files with 36 additions and 17 deletions

View file

@ -582,7 +582,6 @@ void CallModel::accept (bool withVideo) {
} else
App::smartShowWindow(callsWindow);
}
qApp->processEvents(); // Process GUI events before accepting in order to be synchronized with Call objects and be ready to get SDK events
shared_ptr<linphone::Core> core = coreManager->getCore();
if(mCall) {
shared_ptr<linphone::CallParams> params = core->createCallParams(mCall);

View file

@ -966,7 +966,6 @@ void ChatRoomModel::setEntriesLoading(const bool& loading){
if( mEntriesLoading != loading){
mEntriesLoading = loading;
emit entriesLoadingChanged(mEntriesLoading);
qApp->processEvents();
}
}

View file

@ -6,6 +6,7 @@ import Common 1.0
import Linphone 1.0
import App.Styles 1.0
import Common.Styles 1.0
import 'CallsWindow.js' as Logic
@ -268,22 +269,42 @@ Window {
// -----------------------------------------------------------------------
childA: Loader {
id: middlePane
childA: Rectangle{
anchors.fill: parent
sourceComponent: Logic.getContent(window.call, window.conferenceInfoModel)
property var lastComponent: null
onSourceComponentChanged: {
if(lastComponent != sourceComponent){
if( sourceComponent == waitingRoom)
mainPaned.close()
rightPaned.childAItem.update()
if(!sourceComponent && calls.count == 0)
window.close()
lastComponent = sourceComponent
}
}// Force update when loading a new Content. It's just to be sure
active: window.call || window.conferenceInfoModel
color: 'transparent'
ColumnLayout {
id: waitingPage
anchors.fill: parent
visible: middlePane.status != Loader.Ready || !middlePane.sourceComponent
Loader{
Layout.preferredHeight: 40
Layout.preferredWidth: 40
Layout.alignment: Qt.AlignCenter
active: waitingPage.visible
sourceComponent: Component{
BusyIndicator{
color: BusyIndicatorStyle.alternateColor.color
}
}
}
}
Loader {
id: middlePane
anchors.fill: parent
sourceComponent: Logic.getContent(window.call, window.conferenceInfoModel)
property var lastComponent: null
onSourceComponentChanged: {
if(lastComponent != sourceComponent){
if( sourceComponent == waitingRoom)
mainPaned.close()
rightPaned.childAItem.update()
if(!sourceComponent && calls.count == 0)
window.close()
lastComponent = sourceComponent
}
}// Force update when loading a new Content. It's just to be sure
active: window.call || window.conferenceInfoModel
}
}
childB: Loader {