mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
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="contact_parameters" overwrite="true">message-expires=2419200</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="rtp_bundle" overwrite="true">1</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";
|
||||
}
|
||||
|
||||
QString Utils::formatDate(const QDateTime &date, bool includeTime) {
|
||||
QString Utils::formatDate(const QDateTime &date, bool includeTime, QString format) {
|
||||
QString dateDay;
|
||||
//: "Aujourd'hui"
|
||||
if (date.date() == QDate::currentDate()) dateDay = tr("today");
|
||||
//: "Hier
|
||||
else if (date.date() == QDate::currentDate().addDays(-1)) dateDay = tr("yesterday");
|
||||
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 yyyy";
|
||||
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 formatElapsedTime(int seconds,
|
||||
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 formatTime(const QDateTime &date); // Return the time formated
|
||||
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 hoveredImageColor: style?.image?.pressed || Qt.darker(contentImageColor, 1.05)
|
||||
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)
|
||||
hoverEnabled: enabled
|
||||
activeFocusOnTab: true
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import QtQuick.Controls.Basic as Control
|
|||
import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
import Linphone
|
||||
import UtilsCpp
|
||||
|
||||
ComboBox {
|
||||
id: mainItem
|
||||
|
|
@ -12,7 +13,7 @@ ComboBox {
|
|||
property alias contentText: contentText
|
||||
contentItem: Text {
|
||||
id: contentText
|
||||
text: Qt.formatDate(calendar.selectedDate, "ddd d, MMMM")
|
||||
text: UtilsCpp.formatDate(calendar.selectedDate, false, "ddd d, MMMM")
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Math.round(15 * DefaultStyle.dp)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ ColumnLayout {
|
|||
imageHeight: Math.round(24 * DefaultStyle.dp)
|
||||
}
|
||||
Text {
|
||||
//: "Sonnerie - Appels entrants"
|
||||
//: Ringtone - Incoming calls
|
||||
text: qsTr("multimedia_settings_ringer_title")
|
||||
font: Typography.p2l
|
||||
color: DefaultStyle.main2_600
|
||||
|
|
|
|||
|
|
@ -131,10 +131,10 @@ Rectangle {
|
|||
height: contentHeight
|
||||
spacing: Math.round(10 * DefaultStyle.dp)
|
||||
delegate: ColumnLayout {
|
||||
visible: modelData?.visible
|
||||
visible: modelData.visible != undefined ? modelData.visible: true
|
||||
Component.onCompleted: if (!visible) height = 0
|
||||
spacing: Math.round(16 * DefaultStyle.dp)
|
||||
width: contentListView.width
|
||||
height: visible ? childrenRect.height: 0
|
||||
Rectangle {
|
||||
visible: index !== 0
|
||||
Layout.topMargin: Math.round((modelData.hideTopSeparator ? 0 : 16) * DefaultStyle.dp)
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ AbstractSettingsLayout {
|
|||
toValidate: true
|
||||
}
|
||||
Text {
|
||||
//: "Indicatif international*"
|
||||
//: Indicatif international*
|
||||
text: qsTr("manage_account_international_prefix")
|
||||
color: DefaultStyle.main2_600
|
||||
font: Typography.p2l
|
||||
|
|
|
|||
|
|
@ -12,32 +12,32 @@ AbstractSettingsLayout {
|
|||
width: parent?.width
|
||||
contentModel: [
|
||||
{
|
||||
//: "Système"
|
||||
//: System
|
||||
title: qsTr("settings_system_title"),
|
||||
subTitle: "",
|
||||
contentComponent: systemComponent
|
||||
},
|
||||
{
|
||||
//: "Configuration distante"
|
||||
//: Remote provisioning
|
||||
title: qsTr("settings_remote_provisioning_title"),
|
||||
subTitle: "",
|
||||
contentComponent: remoteProvisioningComponent,
|
||||
hideTopSeparator: true
|
||||
},
|
||||
{
|
||||
//: "Sécurité / Chiffrement"
|
||||
//: Security / Encryption
|
||||
title: qsTr("settings_security_title"),
|
||||
subTitle: "",
|
||||
contentComponent: securityComponent,
|
||||
},
|
||||
{
|
||||
//: "Codecs audio"
|
||||
//: Audio codecs
|
||||
title: qsTr("settings_advanced_audio_codecs_title"),
|
||||
subTitle: "",
|
||||
contentComponent: audioCodecsComponent,
|
||||
},
|
||||
{
|
||||
//: "Codecs vidéo"
|
||||
//: Video codecs
|
||||
title: qsTr("settings_advanced_video_codecs_title"),
|
||||
subTitle: "",
|
||||
contentComponent: videoCodecsComponent
|
||||
|
|
@ -63,7 +63,7 @@ AbstractSettingsLayout {
|
|||
spacing: Math.round(40 * DefaultStyle.dp)
|
||||
SwitchSetting {
|
||||
Layout.fillWidth: true
|
||||
//: "Démarrer automatiquement %1"
|
||||
//: Auto start %1
|
||||
titleText: qsTr("settings_advanced_auto_start_title").arg(applicationName)
|
||||
propertyName: "autoStart"
|
||||
propertyOwner: SettingsCpp
|
||||
|
|
@ -81,14 +81,14 @@ AbstractSettingsLayout {
|
|||
DecoratedTextField {
|
||||
Layout.fillWidth: true
|
||||
id: configUri
|
||||
//: "URL de configuration distante"
|
||||
//: Remote provisioning URL
|
||||
title: qsTr("settings_advanced_remote_provisioning_url")
|
||||
toValidate: true
|
||||
}
|
||||
SmallButton {
|
||||
Layout.topMargin: -Math.round(20 * DefaultStyle.dp)
|
||||
Layout.alignment: Qt.AlignRight
|
||||
//: "Télécharger et appliquer"
|
||||
//: Download and apply
|
||||
text: qsTr("settings_advanced_download_apply_remote_provisioning")
|
||||
style: ButtonStyle.tertiary
|
||||
onClicked: {
|
||||
|
|
@ -96,7 +96,7 @@ AbstractSettingsLayout {
|
|||
if (UtilsCpp.isValidURL(url))
|
||||
UtilsCpp.useFetchConfig(configUri.value())
|
||||
else
|
||||
//: "Format d'url invalide"
|
||||
//: Invalid URL format
|
||||
UtilsCpp.showInformationPopup(qsTr("information_popup_error_title"), qsTr("settings_advanced_invalid_url_message"), false, UtilsCpp.getMainWindow())
|
||||
}
|
||||
}
|
||||
|
|
@ -110,7 +110,7 @@ AbstractSettingsLayout {
|
|||
ColumnLayout {
|
||||
spacing: Math.round(5 * DefaultStyle.dp)
|
||||
Text {
|
||||
//: "Chiffrement du média"
|
||||
//: Media encryption
|
||||
text: qsTr("settings_advanced_media_encryption_title")
|
||||
font {
|
||||
pixelSize: Typography.p2l.pixelSize
|
||||
|
|
@ -123,12 +123,12 @@ AbstractSettingsLayout {
|
|||
entries: SettingsCpp.mediaEncryptions
|
||||
propertyName: "mediaEncryption"
|
||||
textRole: 'display_name'
|
||||
propertyOwner: SettingsCpp
|
||||
propertyOwner: SettingsCpp
|
||||
}
|
||||
}
|
||||
SwitchSetting {
|
||||
Layout.fillWidth: true
|
||||
//: "Chiffrement du média obligatoire"
|
||||
//: Media encryption mandatory
|
||||
titleText: qsTr("settings_advanced_media_encryption_mandatory_title")
|
||||
propertyName: "mediaEncryptionMandatory"
|
||||
propertyOwner: SettingsCpp
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue