use utils formatDate function
close #LINQT-1704 remove video conference factory uri for 6.0 linphone accounts
This commit is contained in:
parent
34f914ca55
commit
1f05363fd4
9 changed files with 23 additions and 22 deletions
|
|
@ -20,7 +20,7 @@
|
||||||
<entry name="realm" overwrite="true">sip.linphone.org</entry>
|
<entry name="realm" overwrite="true">sip.linphone.org</entry>
|
||||||
<entry name="contact_parameters" overwrite="true">message-expires=2419200</entry>
|
<entry name="contact_parameters" overwrite="true">message-expires=2419200</entry>
|
||||||
<entry name="conference_factory_uri" overwrite="true">sip:conference-factory@sip.linphone.org</entry>
|
<entry name="conference_factory_uri" overwrite="true">sip:conference-factory@sip.linphone.org</entry>
|
||||||
<entry name="audio_video_conference_factory_uri" overwrite="true">sip:videoconference-factory@sip.linphone.org</entry>
|
<!--<entry name="audio_video_conference_factory_uri" overwrite="true">sip:videoconference-factory@sip.linphone.org</entry>-->
|
||||||
<entry name="cpim_in_basic_chat_rooms_enabled" overwrite="true">1</entry>
|
<entry name="cpim_in_basic_chat_rooms_enabled" overwrite="true">1</entry>
|
||||||
<entry name="rtp_bundle" overwrite="true">1</entry>
|
<entry name="rtp_bundle" overwrite="true">1</entry>
|
||||||
<entry name="lime_server_url" overwrite="true">https://lime.linphone.org/lime-server/lime-server.php</entry>
|
<entry name="lime_server_url" overwrite="true">https://lime.linphone.org/lime-server/lime-server.php</entry>
|
||||||
|
|
|
||||||
|
|
@ -297,14 +297,14 @@ QString Utils::formatElapsedTime(int seconds, bool dotsSeparator) {
|
||||||
else return (h == 0 ? "" : hours + "h ") + (m == 0 ? "" : min + "min ") + sec + "s";
|
else return (h == 0 ? "" : hours + "h ") + (m == 0 ? "" : min + "min ") + sec + "s";
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Utils::formatDate(const QDateTime &date, bool includeTime) {
|
QString Utils::formatDate(const QDateTime &date, bool includeTime, QString format) {
|
||||||
QString dateDay;
|
QString dateDay;
|
||||||
//: "Aujourd'hui"
|
//: "Aujourd'hui"
|
||||||
if (date.date() == QDate::currentDate()) dateDay = tr("today");
|
if (date.date() == QDate::currentDate()) dateDay = tr("today");
|
||||||
//: "Hier
|
//: "Hier
|
||||||
else if (date.date() == QDate::currentDate().addDays(-1)) dateDay = tr("yesterday");
|
else if (date.date() == QDate::currentDate().addDays(-1)) dateDay = tr("yesterday");
|
||||||
else {
|
else {
|
||||||
QString format = date.date().year() == QDateTime::currentDateTime(date.timeZone()).date().year()
|
if(format.isEmpty()) format = date.date().year() == QDateTime::currentDateTime(date.timeZone()).date().year()
|
||||||
? "dd MMMM"
|
? "dd MMMM"
|
||||||
: "dd MMMM yyyy";
|
: "dd MMMM yyyy";
|
||||||
dateDay = App::getInstance()->getLocale().toString(date.date(), format);
|
dateDay = App::getInstance()->getLocale().toString(date.date(), format);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ public:
|
||||||
Q_INVOKABLE static QString createAvatar(const QUrl &fileUrl); // Return the avatar path
|
Q_INVOKABLE static QString createAvatar(const QUrl &fileUrl); // Return the avatar path
|
||||||
Q_INVOKABLE static QString formatElapsedTime(int seconds,
|
Q_INVOKABLE static QString formatElapsedTime(int seconds,
|
||||||
bool dotsSeparator = true); // Return the elapsed time formated
|
bool dotsSeparator = true); // Return the elapsed time formated
|
||||||
Q_INVOKABLE static QString formatDate(const QDateTime &date, bool includeTime = true); // Return the date formated
|
Q_INVOKABLE static QString formatDate(const QDateTime &date, bool includeTime = true, QString format = ""); // Return the date formated
|
||||||
Q_INVOKABLE static QString formatDateElapsedTime(const QDateTime &date);
|
Q_INVOKABLE static QString formatDateElapsedTime(const QDateTime &date);
|
||||||
Q_INVOKABLE static QString formatTime(const QDateTime &date); // Return the time formated
|
Q_INVOKABLE static QString formatTime(const QDateTime &date); // Return the time formated
|
||||||
Q_INVOKABLE static QStringList generateSecurityLettersArray(int arraySize, int correctIndex, QString correctCode);
|
Q_INVOKABLE static QStringList generateSecurityLettersArray(int arraySize, int correctIndex, QString correctCode);
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ Control.Button {
|
||||||
property var contentImageColor: style?.image?.normal || DefaultStyle.main2_600
|
property var contentImageColor: style?.image?.normal || DefaultStyle.main2_600
|
||||||
property var hoveredImageColor: style?.image?.pressed || Qt.darker(contentImageColor, 1.05)
|
property var hoveredImageColor: style?.image?.pressed || Qt.darker(contentImageColor, 1.05)
|
||||||
property var pressedImageColor: style?.image?.pressed || Qt.darker(contentImageColor, 1.1)
|
property var pressedImageColor: style?.image?.pressed || Qt.darker(contentImageColor, 1.1)
|
||||||
property bool asynchronous: true
|
property bool asynchronous: false
|
||||||
spacing: Math.round(5 * DefaultStyle.dp)
|
spacing: Math.round(5 * DefaultStyle.dp)
|
||||||
hoverEnabled: enabled
|
hoverEnabled: enabled
|
||||||
activeFocusOnTab: true
|
activeFocusOnTab: true
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import QtQuick.Controls.Basic as Control
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import Linphone
|
import Linphone
|
||||||
|
import UtilsCpp
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
|
|
@ -12,7 +13,7 @@ ComboBox {
|
||||||
property alias contentText: contentText
|
property alias contentText: contentText
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
id: contentText
|
id: contentText
|
||||||
text: Qt.formatDate(calendar.selectedDate, "ddd d, MMMM")
|
text: UtilsCpp.formatDate(calendar.selectedDate, false, "ddd d, MMMM")
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: Math.round(15 * DefaultStyle.dp)
|
anchors.leftMargin: Math.round(15 * DefaultStyle.dp)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ ColumnLayout {
|
||||||
imageHeight: Math.round(24 * DefaultStyle.dp)
|
imageHeight: Math.round(24 * DefaultStyle.dp)
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
//: "Sonnerie - Appels entrants"
|
//: Ringtone - Incoming calls
|
||||||
text: qsTr("multimedia_settings_ringer_title")
|
text: qsTr("multimedia_settings_ringer_title")
|
||||||
font: Typography.p2l
|
font: Typography.p2l
|
||||||
color: DefaultStyle.main2_600
|
color: DefaultStyle.main2_600
|
||||||
|
|
|
||||||
|
|
@ -131,10 +131,10 @@ Rectangle {
|
||||||
height: contentHeight
|
height: contentHeight
|
||||||
spacing: Math.round(10 * DefaultStyle.dp)
|
spacing: Math.round(10 * DefaultStyle.dp)
|
||||||
delegate: ColumnLayout {
|
delegate: ColumnLayout {
|
||||||
visible: modelData?.visible
|
visible: modelData.visible != undefined ? modelData.visible: true
|
||||||
|
Component.onCompleted: if (!visible) height = 0
|
||||||
spacing: Math.round(16 * DefaultStyle.dp)
|
spacing: Math.round(16 * DefaultStyle.dp)
|
||||||
width: contentListView.width
|
width: contentListView.width
|
||||||
height: visible ? childrenRect.height: 0
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: index !== 0
|
visible: index !== 0
|
||||||
Layout.topMargin: Math.round((modelData.hideTopSeparator ? 0 : 16) * DefaultStyle.dp)
|
Layout.topMargin: Math.round((modelData.hideTopSeparator ? 0 : 16) * DefaultStyle.dp)
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ AbstractSettingsLayout {
|
||||||
toValidate: true
|
toValidate: true
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
//: "Indicatif international*"
|
//: Indicatif international*
|
||||||
text: qsTr("manage_account_international_prefix")
|
text: qsTr("manage_account_international_prefix")
|
||||||
color: DefaultStyle.main2_600
|
color: DefaultStyle.main2_600
|
||||||
font: Typography.p2l
|
font: Typography.p2l
|
||||||
|
|
|
||||||
|
|
@ -12,32 +12,32 @@ AbstractSettingsLayout {
|
||||||
width: parent?.width
|
width: parent?.width
|
||||||
contentModel: [
|
contentModel: [
|
||||||
{
|
{
|
||||||
//: "Système"
|
//: System
|
||||||
title: qsTr("settings_system_title"),
|
title: qsTr("settings_system_title"),
|
||||||
subTitle: "",
|
subTitle: "",
|
||||||
contentComponent: systemComponent
|
contentComponent: systemComponent
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
//: "Configuration distante"
|
//: Remote provisioning
|
||||||
title: qsTr("settings_remote_provisioning_title"),
|
title: qsTr("settings_remote_provisioning_title"),
|
||||||
subTitle: "",
|
subTitle: "",
|
||||||
contentComponent: remoteProvisioningComponent,
|
contentComponent: remoteProvisioningComponent,
|
||||||
hideTopSeparator: true
|
hideTopSeparator: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
//: "Sécurité / Chiffrement"
|
//: Security / Encryption
|
||||||
title: qsTr("settings_security_title"),
|
title: qsTr("settings_security_title"),
|
||||||
subTitle: "",
|
subTitle: "",
|
||||||
contentComponent: securityComponent,
|
contentComponent: securityComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
//: "Codecs audio"
|
//: Audio codecs
|
||||||
title: qsTr("settings_advanced_audio_codecs_title"),
|
title: qsTr("settings_advanced_audio_codecs_title"),
|
||||||
subTitle: "",
|
subTitle: "",
|
||||||
contentComponent: audioCodecsComponent,
|
contentComponent: audioCodecsComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
//: "Codecs vidéo"
|
//: Video codecs
|
||||||
title: qsTr("settings_advanced_video_codecs_title"),
|
title: qsTr("settings_advanced_video_codecs_title"),
|
||||||
subTitle: "",
|
subTitle: "",
|
||||||
contentComponent: videoCodecsComponent
|
contentComponent: videoCodecsComponent
|
||||||
|
|
@ -63,7 +63,7 @@ AbstractSettingsLayout {
|
||||||
spacing: Math.round(40 * DefaultStyle.dp)
|
spacing: Math.round(40 * DefaultStyle.dp)
|
||||||
SwitchSetting {
|
SwitchSetting {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
//: "Démarrer automatiquement %1"
|
//: Auto start %1
|
||||||
titleText: qsTr("settings_advanced_auto_start_title").arg(applicationName)
|
titleText: qsTr("settings_advanced_auto_start_title").arg(applicationName)
|
||||||
propertyName: "autoStart"
|
propertyName: "autoStart"
|
||||||
propertyOwner: SettingsCpp
|
propertyOwner: SettingsCpp
|
||||||
|
|
@ -81,14 +81,14 @@ AbstractSettingsLayout {
|
||||||
DecoratedTextField {
|
DecoratedTextField {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
id: configUri
|
id: configUri
|
||||||
//: "URL de configuration distante"
|
//: Remote provisioning URL
|
||||||
title: qsTr("settings_advanced_remote_provisioning_url")
|
title: qsTr("settings_advanced_remote_provisioning_url")
|
||||||
toValidate: true
|
toValidate: true
|
||||||
}
|
}
|
||||||
SmallButton {
|
SmallButton {
|
||||||
Layout.topMargin: -Math.round(20 * DefaultStyle.dp)
|
Layout.topMargin: -Math.round(20 * DefaultStyle.dp)
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
//: "Télécharger et appliquer"
|
//: Download and apply
|
||||||
text: qsTr("settings_advanced_download_apply_remote_provisioning")
|
text: qsTr("settings_advanced_download_apply_remote_provisioning")
|
||||||
style: ButtonStyle.tertiary
|
style: ButtonStyle.tertiary
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
@ -96,7 +96,7 @@ AbstractSettingsLayout {
|
||||||
if (UtilsCpp.isValidURL(url))
|
if (UtilsCpp.isValidURL(url))
|
||||||
UtilsCpp.useFetchConfig(configUri.value())
|
UtilsCpp.useFetchConfig(configUri.value())
|
||||||
else
|
else
|
||||||
//: "Format d'url invalide"
|
//: Invalid URL format
|
||||||
UtilsCpp.showInformationPopup(qsTr("information_popup_error_title"), qsTr("settings_advanced_invalid_url_message"), false, UtilsCpp.getMainWindow())
|
UtilsCpp.showInformationPopup(qsTr("information_popup_error_title"), qsTr("settings_advanced_invalid_url_message"), false, UtilsCpp.getMainWindow())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -110,7 +110,7 @@ AbstractSettingsLayout {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: Math.round(5 * DefaultStyle.dp)
|
spacing: Math.round(5 * DefaultStyle.dp)
|
||||||
Text {
|
Text {
|
||||||
//: "Chiffrement du média"
|
//: Media encryption
|
||||||
text: qsTr("settings_advanced_media_encryption_title")
|
text: qsTr("settings_advanced_media_encryption_title")
|
||||||
font {
|
font {
|
||||||
pixelSize: Typography.p2l.pixelSize
|
pixelSize: Typography.p2l.pixelSize
|
||||||
|
|
@ -123,12 +123,12 @@ AbstractSettingsLayout {
|
||||||
entries: SettingsCpp.mediaEncryptions
|
entries: SettingsCpp.mediaEncryptions
|
||||||
propertyName: "mediaEncryption"
|
propertyName: "mediaEncryption"
|
||||||
textRole: 'display_name'
|
textRole: 'display_name'
|
||||||
propertyOwner: SettingsCpp
|
propertyOwner: SettingsCpp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SwitchSetting {
|
SwitchSetting {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
//: "Chiffrement du média obligatoire"
|
//: Media encryption mandatory
|
||||||
titleText: qsTr("settings_advanced_media_encryption_mandatory_title")
|
titleText: qsTr("settings_advanced_media_encryption_mandatory_title")
|
||||||
propertyName: "mediaEncryptionMandatory"
|
propertyName: "mediaEncryptionMandatory"
|
||||||
propertyOwner: SettingsCpp
|
propertyOwner: SettingsCpp
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue