mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
Fix the start datetime in conference scheduling by bypassing javascript dates with strings.
This commit is contained in:
parent
a434eb730a
commit
1bbc35701d
3 changed files with 11 additions and 2 deletions
|
|
@ -271,6 +271,14 @@ void ConferenceInfoModel::setDateTime(const QDate& date, const QTime& time, Time
|
|||
setDateTime(QDateTime(date, time, model->getTimeZone()));
|
||||
}
|
||||
|
||||
void ConferenceInfoModel::setDateTimeStr(const QString& date, const QString& time, TimeZoneModel * model){
|
||||
setIsScheduled(true);
|
||||
QDateTime t = QDateTime::fromString(date + " " +time, "yyyy/MM/dd hh:mm:ss");
|
||||
t.setTimeZone(model->getTimeZone());
|
||||
setDateTime(t);
|
||||
}
|
||||
|
||||
|
||||
void ConferenceInfoModel::setDuration(const int& duration){
|
||||
mConferenceInfo->setDuration(duration);
|
||||
setIsEnded(getIsEnded());
|
||||
|
|
|
|||
|
|
@ -98,7 +98,8 @@ public:
|
|||
void setIsEnded(const bool& end);
|
||||
void setInviteMode(const int& modes);
|
||||
|
||||
Q_INVOKABLE void setDateTime(const QDate& date, const QTime& time, TimeZoneModel * model);
|
||||
void setDateTime(const QDate& date, const QTime& time, TimeZoneModel * model);
|
||||
Q_INVOKABLE void setDateTimeStr(const QString& date, const QString& time, TimeZoneModel * model);
|
||||
Q_INVOKABLE void setParticipants(ParticipantListModel * participants);
|
||||
void setConferenceInfo(std::shared_ptr<linphone::ConferenceInfo> conferenceInfo);
|
||||
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ DialogPlus {
|
|||
}
|
||||
conferenceManager.creationState = 1
|
||||
if( scheduledSwitch.checked){
|
||||
conferenceInfoModel.setDateTime(UtilsCpp.toDate(dateField.getDateString(), 'yyyy/MM/dd'), timeField.getTime()+':00', timeZoneField.model.getAt(timeZoneField.currentIndex) )
|
||||
conferenceInfoModel.setDateTimeStr(dateField.getDateString(), timeField.getTime()+':00', timeZoneField.model.getAt(timeZoneField.currentIndex) )
|
||||
conferenceInfoModel.duration = durationField.model[durationField.currentIndex].value
|
||||
}else{
|
||||
conferenceInfoModel.isScheduled = false
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue