Update subject/description string encoding from API.

Hide spinner on ending call.
This commit is contained in:
Julien Wadel 2022-10-18 15:09:54 +02:00
parent a69dcc14d3
commit 697f9eb1d3
5 changed files with 17 additions and 15 deletions

View file

@ -96,7 +96,7 @@ std::shared_ptr<linphone::Conference> ConferenceModel::getConference()const{
}
QString ConferenceModel::getSubject() const{
return QString::fromStdString(mConference->getSubject());
return Utils::coreStringToAppString(mConference->getSubject());
}
QDateTime ConferenceModel::getStartDate() const{

View file

@ -162,7 +162,7 @@ QString ConferenceInfoModel::getOrganizer() const{
}
QString ConferenceInfoModel::getSubject() const{
return QString::fromStdString(mConferenceInfo->getSubject());
return Utils::coreStringToAppString(mConferenceInfo->getSubject());
}
QString ConferenceInfoModel::getDescription() const{
@ -238,7 +238,7 @@ void ConferenceInfoModel::setDuration(const int& duration){
}
void ConferenceInfoModel::setSubject(const QString& subject){
mConferenceInfo->setSubject(subject.toStdString());
mConferenceInfo->setSubject(Utils::appStringToCoreString(subject));
emit subjectChanged();
}
@ -248,7 +248,7 @@ void ConferenceInfoModel::setOrganizer(const QString& organizerAddress){
}
void ConferenceInfoModel::setDescription(const QString& description){
mConferenceInfo->setDescription(description.toStdString());
mConferenceInfo->setDescription(Utils::appStringToCoreString(description));
emit descriptionChanged();
}

View file

@ -89,7 +89,9 @@ QString ContentModel::getUtf8Text() const{
ConferenceInfoModel * ContentModel::getConferenceInfoModel(){
if( !mConferenceInfoModel && isIcalendar()){
mConferenceInfoModel = ConferenceInfoModel::create(linphone::Factory::get()->createConferenceInfoFromIcalendarContent(mContent));
auto conferenceInfo = linphone::Factory::get()->createConferenceInfoFromIcalendarContent(mContent);
if(conferenceInfo)
mConferenceInfoModel = ConferenceInfoModel::create(conferenceInfo);
}
return mConferenceInfoModel.get();
}

View file

@ -54,7 +54,7 @@ static inline void fillCallStartEntry (QVariantMap &dest, const shared_ptr<linph
dest["status"] = static_cast<HistoryModel::CallStatus>(callLog->getStatus());
dest["isStart"] = true;
if(callLog->getConferenceInfo())
dest["title"] = QString::fromStdString(callLog->getConferenceInfo()->getSubject());
dest["title"] = Utils::coreStringToAppString(callLog->getConferenceInfo()->getSubject());
dest["sipAddress"] = Utils::coreStringToAppString(callLog->getRemoteAddress()->asString());
dest["callId"] = Utils::coreStringToAppString(callLog->getCallId());
dest["wasConference"] = callLog->wasConference();
@ -67,7 +67,7 @@ static inline void fillCallEndEntry (QVariantMap &dest, const shared_ptr<linphon
dest["status"] = static_cast<HistoryModel::CallStatus>(callLog->getStatus());
dest["isStart"] = false;
if(callLog->getConferenceInfo())
dest["title"] = QString::fromStdString(callLog->getConferenceInfo()->getSubject());
dest["title"] = Utils::coreStringToAppString(callLog->getConferenceInfo()->getSubject());
dest["sipAddress"] = Utils::coreStringToAppString(callLog->getRemoteAddress()->asString());
dest["callId"] = Utils::coreStringToAppString(callLog->getCallId());
dest["wasConference"] = callLog->wasConference();

View file

@ -22,7 +22,7 @@ Rectangle {
property CallModel callModel // Store the call for processing calling.
property bool previewLoaderEnabled: callModel ? callModel.videoEnabled : true
property var _sipAddressObserver: callModel ? SipAddressesModel.getSipAddressObserver(callModel.fullPeerAddress, callModel.fullLocalAddress) : undefined
property bool isEnding: callModel && callModel.status == CallModel.CallStatusEnded
property bool isEnded: callModel && callModel.status == CallModel.CallStatusEnded
signal cancel()
@ -58,14 +58,14 @@ Rectangle {
Layout.preferredWidth: WaitingRoomStyle.header.busyIndicator.width
Layout.topMargin: 30
color: WaitingRoomStyle.header.busyIndicator.color
visible: mainItem.callModel && mainItem.callModel.status !== CallModel.CallStatusConnected
visible: mainItem.callModel && mainItem.callModel.status !== CallModel.CallStatusConnected && !mainItem.isEnded
}
Text{
Layout.alignment: Qt.AlignCenter
text: mainItem.callModel
? mainItem.isEnding
//: "Ending call" : status of the call in waiting room when the call end.
? mainItem.isEnded
//: "Call ended" : status of the call in waiting room when the call end.
? qsTr("endCallStatus")
: mainItem.callModel.isOutgoing
//: "Outgoing call" : status of the call in waiting room when user is calling.
@ -86,7 +86,7 @@ Rectangle {
font.pointSize: WaitingRoomStyle.elapsedTime.pointSize
horizontalAlignment: Text.AlignHCenter
width: parent.width
visible: mainItem.callModel && !mainItem.isEnding
visible: mainItem.callModel && !mainItem.isEnded
Timer {
interval: 1000
repeat: true
@ -151,7 +151,7 @@ Rectangle {
: mainItem.callModel
? mainItem.callModel.conferenceModel
: null
deactivateCamera: !mainItem.previewLoaderEnabled || mainItem.isEnding
deactivateCamera: !mainItem.previewLoaderEnabled || mainItem.isEnded
/*
image: mainItem._sipAddressObserver && mainItem._sipAddressObserver.contact && mainItem._sipAddressObserver.contact.vcard.avatar
@ -228,7 +228,7 @@ Rectangle {
Layout.alignment: Qt.AlignCenter
Layout.topMargin: 20
Layout.bottomMargin: 15
visible: mainItem.conferenceInfoModel && !mainItem.isEnding
visible: mainItem.conferenceInfoModel && !mainItem.isEnded
spacing: 30
TextButtonA {
@ -262,7 +262,7 @@ Rectangle {
Layout.preferredHeight: actionsButtons.height
Layout.bottomMargin: 30
Layout.topMargin: 20
visible: !mainItem.isEnding
visible: !mainItem.isEnded
// Action buttons
RowLayout{
id: actionsButtons