- Conference layout refreshing on creation.

- Crash and display of local conferences.
This commit is contained in:
Julien Wadel 2023-03-13 15:09:22 +01:00
parent 66982bd0c3
commit 24d85e2eb4
5 changed files with 15 additions and 6 deletions

View file

@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 5.0.13 - undefined
### Fixed
- Conference layout refreshing on creation.
- Crash and display of local conferences.
- Crash on chat rooms with default account.
- Show display name for local accounts.

View file

@ -252,6 +252,10 @@ QSharedPointer<ConferenceModel> CallModel::getConferenceSharedModel(){
return mConferenceModel;
}
bool CallModel::isInConference () const{
return mIsInConference;
}
bool CallModel::isConference () const{
// Check status to avoid crash when requesting a conference on an ended call.
bool isConf = false;
@ -498,6 +502,7 @@ void CallModel::handleCallStateChanged (const shared_ptr<linphone::Call> &call,
auto conferenceInfo = CoreManager::getInstance()->getCore()->findConferenceInformationFromUri(getConferenceAddress());
if( conferenceInfo ){
mConferenceInfoModel = ConferenceInfoModel::create(conferenceInfo);
getConferenceSharedModel(); // emit new conferenceModel if it was not created.
emit conferenceInfoModelChanged();
}
}
@ -511,7 +516,7 @@ void CallModel::handleCallStateChanged (const shared_ptr<linphone::Call> &call,
break;
case linphone::Call::State::StreamsRunning: {
getConferenceSharedModel();
if (!mWasConnected && CoreManager::getInstance()->getSettingsModel()->getAutomaticallyRecordCalls()) {
startRecording();
mWasConnected = true;

View file

@ -144,9 +144,7 @@ public:
ConferenceInfoModel* getConferenceInfoModel();
QSharedPointer<ConferenceModel> getConferenceSharedModel();
bool isInConference () const {
return mIsInConference;
}
bool isInConference () const;
bool isConference () const;
bool isOneToOne() const;

View file

@ -57,8 +57,11 @@ bool ParticipantDeviceProxyModel::lessThan (const QModelIndex &left, const QMode
ParticipantDeviceModel *ParticipantDeviceProxyModel::getAt(int row){
QModelIndex sourceIndex = mapToSource(this->index(row, 0));
return sourceModel()->data(sourceIndex).value<ParticipantDeviceModel *>();
if(row>=0){
QModelIndex sourceIndex = mapToSource(this->index(row, 0));
return sourceModel()->data(sourceIndex).value<ParticipantDeviceModel *>();
}else
return nullptr;
}
ParticipantDeviceModel* ParticipantDeviceProxyModel::getActiveSpeakerModel(){

View file

@ -89,6 +89,7 @@ ColumnLayout{
if( columns != bestLayout[1])
columns = bestLayout[1]
}
onItemCountChanged: updateLayout()
property int computedWidth: (mainLayout.width - grid.margin ) / columns
property int computedHeight: (mainLayout.height - grid.margin ) / rows
cellWidth: Math.min(computedWidth, computedHeight)