check for update

This commit is contained in:
Gaelle Braud 2025-10-31 18:00:15 +01:00
parent db1f04350a
commit 80bf126b23
18 changed files with 413 additions and 109 deletions

View file

@ -430,6 +430,43 @@ void App::setSelf(QSharedPointer<App>(me)) {
}); });
}); });
// Check update
mCoreModelConnection->makeConnectToModel(
&CoreModel::versionUpdateCheckResultReceived,
[this](const std::shared_ptr<linphone::Core> &core, linphone::VersionUpdateCheckResult result,
const std::string &version, const std::string &url, bool checkRequestedByUser) {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
mCoreModelConnection->invokeToCore([this, result, version, url, checkRequestedByUser] {
switch (result) {
case linphone::VersionUpdateCheckResult::Error:
if (checkRequestedByUser)
Utils::showInformationPopup(tr("info_popup_error_title"),
//: An error occured while trying to check update. Please
//: try again later or contact support team.
tr("info_popup_error_checking_update"), false);
break;
case linphone::VersionUpdateCheckResult::NewVersionAvailable: {
QString downloadLink =
QStringLiteral("<a href='%1'><font color='DefaultStyle.main2_600'>%2</a>")
.arg(url)
.arg(tr("info_popup_new_version_download_label"));
Utils::showInformationPopup(
//: New version available !
tr("info_popup_new_version_available_title"),
//: A new version of Linphone (%1) is available. %2
tr("info_popup_new_version_available_message").arg(version).arg(downloadLink));
break;
}
case linphone::VersionUpdateCheckResult::UpToDate:
if (checkRequestedByUser)
//: Up to date
Utils::showInformationPopup(tr("info_popup_version_up_to_date_title"),
//: Your version is up to date
tr("info_popup_version_up_to_date_message"));
}
});
});
//--------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------
mCliModelConnection = SafeConnection<App, CliModel>::create(me, CliModel::getInstance()); mCliModelConnection = SafeConnection<App, CliModel>::create(me, CliModel::getInstance());
mCliModelConnection->makeConnectToCore(&App::receivedMessage, [this](int, const QByteArray &byteArray) { mCliModelConnection->makeConnectToCore(&App::receivedMessage, [this](int, const QByteArray &byteArray) {
@ -660,6 +697,7 @@ void App::initCore() {
tr("info_popup_configuration_failed_message").arg(message), false); tr("info_popup_configuration_failed_message").arg(message), false);
}); });
} }
checkForUpdate();
mIsRestarting = false; mIsRestarting = false;
//--------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------
@ -1357,6 +1395,12 @@ void App::setSysTrayIcon() {
menu->addSeparator(); menu->addSeparator();
} }
menu->addAction(markAllReadAction); menu->addAction(markAllReadAction);
//: Check for update
if (mSettings->isCheckForUpdateAvailable()) {
QAction *checkForUpdateAction = new QAction(tr("check_for_update"), root);
root->connect(checkForUpdateAction, &QAction::triggered, this, [this] { checkForUpdate(); });
menu->addAction(checkForUpdateAction);
}
menu->addAction(quitAction); menu->addAction(quitAction);
if (!mSystemTrayIcon) { if (!mSystemTrayIcon) {
systemTrayIcon->setContextMenu(menu); // This is a Qt bug. We cannot call setContextMenu more than once. So systemTrayIcon->setContextMenu(menu); // This is a Qt bug. We cannot call setContextMenu more than once. So
@ -1436,6 +1480,17 @@ QString App::getSdkVersion() {
#endif #endif
} }
void App::checkForUpdate(bool requestedByUser) {
mustBeInMainThread(log().arg(Q_FUNC_INFO));
if (CoreModel::getInstance() && mCoreModelConnection) {
mCoreModelConnection->invokeToModel([this, requestedByUser] {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
CoreModel::getInstance()->checkForUpdate(Utils::appStringToCoreString(applicationVersion()),
requestedByUser);
});
}
}
ChatGui *App::getCurrentChat() const { ChatGui *App::getCurrentChat() const {
return mCurrentChat; return mCurrentChat;
} }

View file

@ -165,6 +165,7 @@ public:
QString getGitBranchName(); QString getGitBranchName();
QString getSdkVersion(); QString getSdkVersion();
Q_INVOKABLE void checkForUpdate(bool requestedByUser = false);
ChatGui *getCurrentChat() const; ChatGui *getCurrentChat() const;
void setCurrentChat(ChatGui *chat); void setCurrentChat(ChatGui *chat);

View file

@ -107,6 +107,9 @@ SettingsCore::SettingsCore(QObject *parent) : QObject(parent) {
mEmojiFont = settingsModel->getEmojiFont(); mEmojiFont = settingsModel->getEmojiFont();
mTextMessageFont = settingsModel->getTextMessageFont(); mTextMessageFont = settingsModel->getTextMessageFont();
// Check for update
mIsCheckForUpdateAvailable = settingsModel->isCheckForUpdateAvailable();
// Ui // Ui
INIT_CORE_MEMBER(DisableChatFeature, settingsModel) INIT_CORE_MEMBER(DisableChatFeature, settingsModel)
INIT_CORE_MEMBER(DisableMeetingsFeature, settingsModel) INIT_CORE_MEMBER(DisableMeetingsFeature, settingsModel)
@ -1143,6 +1146,9 @@ void SettingsCore::writeFromModel(const std::shared_ptr<SettingsModel> &model) {
mLogsFolder = model->getLogsFolder(); mLogsFolder = model->getLogsFolder();
mLogsEmail = model->getLogsEmail(); mLogsEmail = model->getLogsEmail();
// Check update
mIsCheckForUpdateAvailable = model->isCheckForUpdateAvailable();
// UI // UI
mDisableChatFeature = model->getDisableChatFeature(); mDisableChatFeature = model->getDisableChatFeature();
mDisableMeetingsFeature = model->getDisableMeetingsFeature(); mDisableMeetingsFeature = model->getDisableMeetingsFeature();
@ -1171,6 +1177,10 @@ void SettingsCore::writeFromModel(const std::shared_ptr<SettingsModel> &model) {
mDownloadFolder = model->getDownloadFolder(); mDownloadFolder = model->getDownloadFolder();
} }
bool SettingsCore::isCheckForUpdateAvailable() const {
return mIsCheckForUpdateAvailable;
}
void SettingsCore::save() { void SettingsCore::save() {
mustBeInMainThread(getClassName() + Q_FUNC_INFO); mustBeInMainThread(getClassName() + Q_FUNC_INFO);
SettingsCore *thisCopy = new SettingsCore(*this); SettingsCore *thisCopy = new SettingsCore(*this);

View file

@ -218,6 +218,7 @@ public:
bool getCardDAVMinCharForResearch() const; bool getCardDAVMinCharForResearch() const;
void setCardDAVMinCharForResearch(int min); void setCardDAVMinCharForResearch(int min);
bool isCheckForUpdateAvailable() const;
Q_INVOKABLE void save(); Q_INVOKABLE void save();
Q_INVOKABLE void undo(); Q_INVOKABLE void undo();
@ -401,6 +402,9 @@ private:
// CardDAV // CardDAV
int mCardDAVMinCharForResearch = 0; int mCardDAVMinCharForResearch = 0;
// Check update
bool mIsCheckForUpdateAvailable = false;
DECLARE_ABSTRACT_OBJECT DECLARE_ABSTRACT_OBJECT
}; };
#endif #endif

View file

@ -641,93 +641,134 @@
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="393"/> <location filename="../../core/App.cpp" line="393"/>
<location filename="../../core/App.cpp" line="658"/> <location filename="../../core/App.cpp" line="443"/>
<location filename="../../core/App.cpp" line="695"/>
<source>info_popup_error_title</source> <source>info_popup_error_title</source>
<extracomment>Error</extracomment> <extracomment>Error</extracomment>
<translation>Fehler</translation> <translation>Fehler</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="394"/> <location filename="../../core/App.cpp" line="394"/>
<location filename="../../core/App.cpp" line="660"/> <location filename="../../core/App.cpp" line="697"/>
<source>info_popup_configuration_failed_message</source> <source>info_popup_configuration_failed_message</source>
<extracomment>Remote provisioning failed : %1</extracomment> <extracomment>Remote provisioning failed : %1</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="654"/> <location filename="../../core/App.cpp" line="446"/>
<source>info_popup_error_checking_update</source>
<extracomment>An error occured while trying to check update. Please try again later or contact support team.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../core/App.cpp" line="452"/>
<source>info_popup_new_version_download_label</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../core/App.cpp" line="455"/>
<source>info_popup_new_version_available_title</source>
<extracomment>New version available !</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../core/App.cpp" line="457"/>
<source>info_popup_new_version_available_message</source>
<extracomment>A new version of Linphone (%1) is available. %2</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../core/App.cpp" line="463"/>
<source>info_popup_version_up_to_date_title</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../core/App.cpp" line="465"/>
<source>info_popup_version_up_to_date_message</source>
<extracomment>Your version is up to date</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../core/App.cpp" line="691"/>
<source>configuration_error_detail</source> <source>configuration_error_detail</source>
<extracomment>not reachable</extracomment> <extracomment>not reachable</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="926"/> <location filename="../../core/App.cpp" line="964"/>
<source>application_description</source> <source>application_description</source>
<extracomment>&quot;A free and open source SIP video-phone.&quot;</extracomment> <extracomment>&quot;A free and open source SIP video-phone.&quot;</extracomment>
<translation>Ein kostenloses Open-Source SIP Video-Telefon.</translation> <translation>Ein kostenloses Open-Source SIP Video-Telefon.</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="928"/> <location filename="../../core/App.cpp" line="966"/>
<source>command_line_arg_order</source> <source>command_line_arg_order</source>
<extracomment>&quot;Send an order to the application towards a command line&quot;</extracomment> <extracomment>&quot;Send an order to the application towards a command line&quot;</extracomment>
<translation>Kommandozeilen-Befehl an die Anwendung schicken</translation> <translation>Kommandozeilen-Befehl an die Anwendung schicken</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="932"/> <location filename="../../core/App.cpp" line="970"/>
<source>command_line_option_show_help</source> <source>command_line_option_show_help</source>
<translation>Zeige Hilfe</translation> <translation>Zeige Hilfe</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="937"/> <location filename="../../core/App.cpp" line="975"/>
<source>command_line_option_show_app_version</source> <source>command_line_option_show_app_version</source>
<translation>App-Version anzeigen</translation> <translation>App-Version anzeigen</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="945"/> <location filename="../../core/App.cpp" line="983"/>
<source>command_line_option_config_to_fetch</source> <source>command_line_option_config_to_fetch</source>
<extracomment>&quot;Specify the linphone configuration file to be fetched. It will be merged with the current configuration.&quot;</extracomment> <extracomment>&quot;Specify the linphone configuration file to be fetched. It will be merged with the current configuration.&quot;</extracomment>
<translation>Abzurufende Linphone-Konfigurationsdatei angeben. Sie wird mit der aktuellen Konfiguration zusammengeführt.</translation> <translation>Abzurufende Linphone-Konfigurationsdatei angeben. Sie wird mit der aktuellen Konfiguration zusammengeführt.</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="947"/> <location filename="../../core/App.cpp" line="985"/>
<source>command_line_option_config_to_fetch_arg</source> <source>command_line_option_config_to_fetch_arg</source>
<extracomment>&quot;URL, path or file&quot;</extracomment> <extracomment>&quot;URL, path or file&quot;</extracomment>
<translation>URL, Pfad oder Datei</translation> <translation>URL, Pfad oder Datei</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="952"/> <location filename="../../core/App.cpp" line="990"/>
<source>command_line_option_minimized</source> <source>command_line_option_minimized</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="955"/> <location filename="../../core/App.cpp" line="993"/>
<source>command_line_option_log_to_stdout</source> <source>command_line_option_log_to_stdout</source>
<translation>Debug-Informationen auf der Standardausgabe ausgeben</translation> <translation>Debug-Informationen auf der Standardausgabe ausgeben</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="958"/> <location filename="../../core/App.cpp" line="996"/>
<source>command_line_option_print_app_logs_only</source> <source>command_line_option_print_app_logs_only</source>
<extracomment>&quot;Print only logs from the application&quot;</extracomment> <extracomment>&quot;Print only logs from the application&quot;</extracomment>
<translation>Nur Anwendungs-Logs ausgeben</translation> <translation>Nur Anwendungs-Logs ausgeben</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1329"/> <location filename="../../core/App.cpp" line="1367"/>
<source>hide_action</source> <source>hide_action</source>
<extracomment>&quot;Cacher&quot; &quot;Afficher&quot;</extracomment> <extracomment>&quot;Cacher&quot; &quot;Afficher&quot;</extracomment>
<translation>Ausblenden</translation> <translation>Ausblenden</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1329"/> <location filename="../../core/App.cpp" line="1367"/>
<source>show_action</source> <source>show_action</source>
<translation>Zeigen</translation> <translation>Zeigen</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1344"/> <location filename="../../core/App.cpp" line="1382"/>
<source>quit_action</source> <source>quit_action</source>
<extracomment>&quot;Quitter&quot;</extracomment> <extracomment>&quot;Quitter&quot;</extracomment>
<translation>Beenden</translation> <translation>Beenden</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1459"/> <location filename="../../core/App.cpp" line="1400"/>
<source>check_for_update</source>
<extracomment>Check for update</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../core/App.cpp" line="1514"/>
<source>mark_all_read_action</source> <source>mark_all_read_action</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -2021,13 +2062,13 @@
<context> <context>
<name>ChatCore</name> <name>ChatCore</name>
<message> <message>
<location filename="../../core/chat/ChatCore.cpp" line="144"/> <location filename="../../core/chat/ChatCore.cpp" line="145"/>
<source>info_toast_deleted_title</source> <source>info_toast_deleted_title</source>
<extracomment>Deleted</extracomment> <extracomment>Deleted</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../core/chat/ChatCore.cpp" line="146"/> <location filename="../../core/chat/ChatCore.cpp" line="147"/>
<source>info_toast_deleted_message_history</source> <source>info_toast_deleted_message_history</source>
<extracomment>Message history has been deleted</extracomment> <extracomment>Message history has been deleted</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -3879,50 +3920,56 @@ Error</extracomment>
<context> <context>
<name>HelpPage</name> <name>HelpPage</name>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="42"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="43"/>
<source>help_title</source> <source>help_title</source>
<extracomment>&quot;Aide&quot;</extracomment> <extracomment>&quot;Aide&quot;</extracomment>
<translation>Hilfe</translation> <translation>Hilfe</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="72"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="73"/>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="130"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="142"/>
<source>help_about_title</source> <source>help_about_title</source>
<extracomment>&quot;À propos de %1&quot;</extracomment> <extracomment>&quot;À propos de %1&quot;</extracomment>
<translation>Über %1</translation> <translation>Über %1</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="86"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="87"/>
<source>help_about_privacy_policy_title</source> <source>help_about_privacy_policy_title</source>
<extracomment>&quot;Règles de confidentialité&quot;</extracomment> <extracomment>&quot;Règles de confidentialité&quot;</extracomment>
<translation>Datenschutzrichtlinie</translation> <translation>Datenschutzrichtlinie</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="88"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="89"/>
<source>help_about_privacy_policy_subtitle</source> <source>help_about_privacy_policy_subtitle</source>
<extracomment>Quelles informations %1 collecte et utilise</extracomment> <extracomment>Quelles informations %1 collecte et utilise</extracomment>
<translation>Welche Informationen sammelt und verwendet %1</translation> <translation>Welche Informationen sammelt und verwendet %1</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="98"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="101"/>
<source>help_about_version_title</source> <source>help_about_version_title</source>
<extracomment>&quot;Version&quot;</extracomment> <extracomment>&quot;Version&quot;</extracomment>
<translation>Version</translation> <translation>Version</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="106"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="110"/>
<source>help_check_for_update_button_label</source>
<extracomment>Check update</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="118"/>
<source>help_about_gpl_licence_title</source> <source>help_about_gpl_licence_title</source>
<extracomment>&quot;Licences GPLv3&quot;</extracomment> <extracomment>&quot;Licences GPLv3&quot;</extracomment>
<translation>GPLv3-Lizenzen</translation> <translation>GPLv3-Lizenzen</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="117"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="129"/>
<source>help_about_contribute_translations_title</source> <source>help_about_contribute_translations_title</source>
<extracomment>&quot;Contribuer à la traduction de %1&quot;</extracomment> <extracomment>&quot;Contribuer à la traduction de %1&quot;</extracomment>
<translation>Zur Übersetzung von %1 beitragen</translation> <translation>Zur Übersetzung von %1 beitragen</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="142"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="154"/>
<source>help_troubleshooting_title</source> <source>help_troubleshooting_title</source>
<extracomment>&quot;Dépannage&quot;</extracomment> <extracomment>&quot;Dépannage&quot;</extracomment>
<translation>Fehlerbehebung</translation> <translation>Fehlerbehebung</translation>
@ -5784,6 +5831,13 @@ Pour les activer dans un projet commercial, merci de nous contacter.</source>
<translation>Konversationen</translation> <translation>Konversationen</translation>
</message> </message>
</context> </context>
<context>
<name>SettingsCore</name>
<message>
<source>info_popup_error_title</source>
<translation type="obsolete">Fehler</translation>
</message>
</context>
<context> <context>
<name>SettingsMenuItem</name> <name>SettingsMenuItem</name>
<message> <message>

View file

@ -636,93 +636,134 @@
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="393"/> <location filename="../../core/App.cpp" line="393"/>
<location filename="../../core/App.cpp" line="658"/> <location filename="../../core/App.cpp" line="443"/>
<location filename="../../core/App.cpp" line="695"/>
<source>info_popup_error_title</source> <source>info_popup_error_title</source>
<extracomment>Error</extracomment> <extracomment>Error</extracomment>
<translation>Error</translation> <translation>Error</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="394"/> <location filename="../../core/App.cpp" line="394"/>
<location filename="../../core/App.cpp" line="660"/> <location filename="../../core/App.cpp" line="697"/>
<source>info_popup_configuration_failed_message</source> <source>info_popup_configuration_failed_message</source>
<extracomment>Remote provisioning failed : %1</extracomment> <extracomment>Remote provisioning failed : %1</extracomment>
<translation>Remote provisioning failed : %1</translation> <translation>Remote provisioning failed : %1</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="654"/> <location filename="../../core/App.cpp" line="446"/>
<source>info_popup_error_checking_update</source>
<extracomment>An error occured while trying to check update. Please try again later or contact support team.</extracomment>
<translation>An error occured while trying to check update. Please try again later or contact support team.</translation>
</message>
<message>
<location filename="../../core/App.cpp" line="452"/>
<source>info_popup_new_version_download_label</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../core/App.cpp" line="455"/>
<source>info_popup_new_version_available_title</source>
<extracomment>New version available !</extracomment>
<translation>New version available !</translation>
</message>
<message>
<location filename="../../core/App.cpp" line="457"/>
<source>info_popup_new_version_available_message</source>
<extracomment>A new version of Linphone (%1) is available. %2</extracomment>
<translation>A new version of Linphone (%1) is available at %1</translation>
</message>
<message>
<location filename="../../core/App.cpp" line="463"/>
<source>info_popup_version_up_to_date_title</source>
<translation>Up to date</translation>
</message>
<message>
<location filename="../../core/App.cpp" line="465"/>
<source>info_popup_version_up_to_date_message</source>
<extracomment>Your version is up to date</extracomment>
<translation>Up to date Your version is up to date</translation>
</message>
<message>
<location filename="../../core/App.cpp" line="691"/>
<source>configuration_error_detail</source> <source>configuration_error_detail</source>
<extracomment>not reachable</extracomment> <extracomment>not reachable</extracomment>
<translation>not reachable</translation> <translation>not reachable</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="926"/> <location filename="../../core/App.cpp" line="964"/>
<source>application_description</source> <source>application_description</source>
<extracomment>&quot;A free and open source SIP video-phone.&quot;</extracomment> <extracomment>&quot;A free and open source SIP video-phone.&quot;</extracomment>
<translation>A free and open source SIP video-phone.</translation> <translation>A free and open source SIP video-phone.</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="928"/> <location filename="../../core/App.cpp" line="966"/>
<source>command_line_arg_order</source> <source>command_line_arg_order</source>
<extracomment>&quot;Send an order to the application towards a command line&quot;</extracomment> <extracomment>&quot;Send an order to the application towards a command line&quot;</extracomment>
<translation>Send an order to the application towards a command line</translation> <translation>Send an order to the application towards a command line</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="932"/> <location filename="../../core/App.cpp" line="970"/>
<source>command_line_option_show_help</source> <source>command_line_option_show_help</source>
<translation>Show this help</translation> <translation>Show this help</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="937"/> <location filename="../../core/App.cpp" line="975"/>
<source>command_line_option_show_app_version</source> <source>command_line_option_show_app_version</source>
<translation>Show app version</translation> <translation>Show app version</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="945"/> <location filename="../../core/App.cpp" line="983"/>
<source>command_line_option_config_to_fetch</source> <source>command_line_option_config_to_fetch</source>
<extracomment>&quot;Specify the linphone configuration file to be fetched. It will be merged with the current configuration.&quot;</extracomment> <extracomment>&quot;Specify the linphone configuration file to be fetched. It will be merged with the current configuration.&quot;</extracomment>
<translation>Specify the linphone configuration file to be fetched. It will be merged with the current configuration.</translation> <translation>Specify the linphone configuration file to be fetched. It will be merged with the current configuration.</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="947"/> <location filename="../../core/App.cpp" line="985"/>
<source>command_line_option_config_to_fetch_arg</source> <source>command_line_option_config_to_fetch_arg</source>
<extracomment>&quot;URL, path or file&quot;</extracomment> <extracomment>&quot;URL, path or file&quot;</extracomment>
<translation>URL, path or file</translation> <translation>URL, path or file</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="952"/> <location filename="../../core/App.cpp" line="990"/>
<source>command_line_option_minimized</source> <source>command_line_option_minimized</source>
<translation>Minimize</translation> <translation>Minimize</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="955"/> <location filename="../../core/App.cpp" line="993"/>
<source>command_line_option_log_to_stdout</source> <source>command_line_option_log_to_stdout</source>
<translation>Log to stdout some debug information while running</translation> <translation>Log to stdout some debug information while running</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="958"/> <location filename="../../core/App.cpp" line="996"/>
<source>command_line_option_print_app_logs_only</source> <source>command_line_option_print_app_logs_only</source>
<extracomment>&quot;Print only logs from the application&quot;</extracomment> <extracomment>&quot;Print only logs from the application&quot;</extracomment>
<translation>Print only logs from the application</translation> <translation>Print only logs from the application</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1329"/> <location filename="../../core/App.cpp" line="1367"/>
<source>hide_action</source> <source>hide_action</source>
<extracomment>&quot;Cacher&quot; &quot;Afficher&quot;</extracomment> <extracomment>&quot;Cacher&quot; &quot;Afficher&quot;</extracomment>
<translation>Hide</translation> <translation>Hide</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1329"/> <location filename="../../core/App.cpp" line="1367"/>
<source>show_action</source> <source>show_action</source>
<translation>Show</translation> <translation>Show</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1344"/> <location filename="../../core/App.cpp" line="1382"/>
<source>quit_action</source> <source>quit_action</source>
<extracomment>&quot;Quitter&quot;</extracomment> <extracomment>&quot;Quitter&quot;</extracomment>
<translation>Quit</translation> <translation>Quit</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1459"/> <location filename="../../core/App.cpp" line="1400"/>
<source>check_for_update</source>
<extracomment>Check for update</extracomment>
<translation>Check for update</translation>
</message>
<message>
<location filename="../../core/App.cpp" line="1514"/>
<source>mark_all_read_action</source> <source>mark_all_read_action</source>
<translation>Marquer tout comme lu</translation> <translation>Marquer tout comme lu</translation>
</message> </message>
@ -1998,13 +2039,13 @@
<context> <context>
<name>ChatCore</name> <name>ChatCore</name>
<message> <message>
<location filename="../../core/chat/ChatCore.cpp" line="144"/> <location filename="../../core/chat/ChatCore.cpp" line="145"/>
<source>info_toast_deleted_title</source> <source>info_toast_deleted_title</source>
<extracomment>Deleted</extracomment> <extracomment>Deleted</extracomment>
<translation>Deleted</translation> <translation>Deleted</translation>
</message> </message>
<message> <message>
<location filename="../../core/chat/ChatCore.cpp" line="146"/> <location filename="../../core/chat/ChatCore.cpp" line="147"/>
<source>info_toast_deleted_message_history</source> <source>info_toast_deleted_message_history</source>
<extracomment>Message history has been deleted</extracomment> <extracomment>Message history has been deleted</extracomment>
<translation>Message history has been deleted</translation> <translation>Message history has been deleted</translation>
@ -3795,50 +3836,56 @@ Expiration : %1</translation>
<context> <context>
<name>HelpPage</name> <name>HelpPage</name>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="42"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="43"/>
<source>help_title</source> <source>help_title</source>
<extracomment>&quot;Aide&quot;</extracomment> <extracomment>&quot;Aide&quot;</extracomment>
<translation>Help</translation> <translation>Help</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="72"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="73"/>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="130"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="142"/>
<source>help_about_title</source> <source>help_about_title</source>
<extracomment>&quot;À propos de %1&quot;</extracomment> <extracomment>&quot;À propos de %1&quot;</extracomment>
<translation>About %1</translation> <translation>About %1</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="86"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="87"/>
<source>help_about_privacy_policy_title</source> <source>help_about_privacy_policy_title</source>
<extracomment>&quot;Règles de confidentialité&quot;</extracomment> <extracomment>&quot;Règles de confidentialité&quot;</extracomment>
<translation>Privacy Policy</translation> <translation>Privacy Policy</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="88"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="89"/>
<source>help_about_privacy_policy_subtitle</source> <source>help_about_privacy_policy_subtitle</source>
<extracomment>Quelles informations %1 collecte et utilise</extracomment> <extracomment>Quelles informations %1 collecte et utilise</extracomment>
<translation>What information does %1 collect and use</translation> <translation>What information does %1 collect and use</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="98"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="101"/>
<source>help_about_version_title</source> <source>help_about_version_title</source>
<extracomment>&quot;Version&quot;</extracomment> <extracomment>&quot;Version&quot;</extracomment>
<translation>Version</translation> <translation>Version</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="106"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="110"/>
<source>help_check_for_update_button_label</source>
<extracomment>Check update</extracomment>
<translation>Check for update</translation>
</message>
<message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="118"/>
<source>help_about_gpl_licence_title</source> <source>help_about_gpl_licence_title</source>
<extracomment>&quot;Licences GPLv3&quot;</extracomment> <extracomment>&quot;Licences GPLv3&quot;</extracomment>
<translation>GPLv3 licences</translation> <translation>GPLv3 licences</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="117"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="129"/>
<source>help_about_contribute_translations_title</source> <source>help_about_contribute_translations_title</source>
<extracomment>&quot;Contribuer à la traduction de %1&quot;</extracomment> <extracomment>&quot;Contribuer à la traduction de %1&quot;</extracomment>
<translation>Contribute to the translation of %1</translation> <translation>Contribute to the translation of %1</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="142"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="154"/>
<source>help_troubleshooting_title</source> <source>help_troubleshooting_title</source>
<extracomment>&quot;Dépannage&quot;</extracomment> <extracomment>&quot;Dépannage&quot;</extracomment>
<translation>Troubleshooting</translation> <translation>Troubleshooting</translation>

View file

@ -636,93 +636,134 @@
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="393"/> <location filename="../../core/App.cpp" line="393"/>
<location filename="../../core/App.cpp" line="658"/> <location filename="../../core/App.cpp" line="443"/>
<location filename="../../core/App.cpp" line="695"/>
<source>info_popup_error_title</source> <source>info_popup_error_title</source>
<extracomment>Error</extracomment> <extracomment>Error</extracomment>
<translation>Erreur</translation> <translation>Erreur</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="394"/> <location filename="../../core/App.cpp" line="394"/>
<location filename="../../core/App.cpp" line="660"/> <location filename="../../core/App.cpp" line="697"/>
<source>info_popup_configuration_failed_message</source> <source>info_popup_configuration_failed_message</source>
<extracomment>Remote provisioning failed : %1</extracomment> <extracomment>Remote provisioning failed : %1</extracomment>
<translation>La configuration distante a échoué : %1</translation> <translation>La configuration distante a échoué : %1</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="654"/> <location filename="../../core/App.cpp" line="446"/>
<source>info_popup_error_checking_update</source>
<extracomment>An error occured while trying to check update. Please try again later or contact support team.</extracomment>
<translation>Une erreur est survenue lors de la recherche de mise à jour. Merci de réessayer plus tard ou de contacter l&apos;équipe de support.</translation>
</message>
<message>
<location filename="../../core/App.cpp" line="452"/>
<source>info_popup_new_version_download_label</source>
<translation>Téléchargez- !</translation>
</message>
<message>
<location filename="../../core/App.cpp" line="455"/>
<source>info_popup_new_version_available_title</source>
<extracomment>New version available !</extracomment>
<translation>Nouvelle version disponible !</translation>
</message>
<message>
<location filename="../../core/App.cpp" line="457"/>
<source>info_popup_new_version_available_message</source>
<extracomment>A new version of Linphone (%1) is available. %2</extracomment>
<translation>Une nouvelle version de Linphone (%1) est disponible. %2</translation>
</message>
<message>
<location filename="../../core/App.cpp" line="463"/>
<source>info_popup_version_up_to_date_title</source>
<translation>À jour</translation>
</message>
<message>
<location filename="../../core/App.cpp" line="465"/>
<source>info_popup_version_up_to_date_message</source>
<extracomment>Your version is up to date</extracomment>
<translation>Votre version est à jour</translation>
</message>
<message>
<location filename="../../core/App.cpp" line="691"/>
<source>configuration_error_detail</source> <source>configuration_error_detail</source>
<extracomment>not reachable</extracomment> <extracomment>not reachable</extracomment>
<translation>indisponible</translation> <translation>indisponible</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="926"/> <location filename="../../core/App.cpp" line="964"/>
<source>application_description</source> <source>application_description</source>
<extracomment>&quot;A free and open source SIP video-phone.&quot;</extracomment> <extracomment>&quot;A free and open source SIP video-phone.&quot;</extracomment>
<translation>A free and open source SIP video-phone.</translation> <translation>A free and open source SIP video-phone.</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="928"/> <location filename="../../core/App.cpp" line="966"/>
<source>command_line_arg_order</source> <source>command_line_arg_order</source>
<extracomment>&quot;Send an order to the application towards a command line&quot;</extracomment> <extracomment>&quot;Send an order to the application towards a command line&quot;</extracomment>
<translation>Send an order to the application towards a command line</translation> <translation>Send an order to the application towards a command line</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="932"/> <location filename="../../core/App.cpp" line="970"/>
<source>command_line_option_show_help</source> <source>command_line_option_show_help</source>
<translation>Show this help</translation> <translation>Show this help</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="937"/> <location filename="../../core/App.cpp" line="975"/>
<source>command_line_option_show_app_version</source> <source>command_line_option_show_app_version</source>
<translation>Afficher la version de l&apos;application</translation> <translation>Afficher la version de l&apos;application</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="945"/> <location filename="../../core/App.cpp" line="983"/>
<source>command_line_option_config_to_fetch</source> <source>command_line_option_config_to_fetch</source>
<extracomment>&quot;Specify the linphone configuration file to be fetched. It will be merged with the current configuration.&quot;</extracomment> <extracomment>&quot;Specify the linphone configuration file to be fetched. It will be merged with the current configuration.&quot;</extracomment>
<translation>Specify the linphone configuration file to be fetched. It will be merged with the current configuration.</translation> <translation>Specify the linphone configuration file to be fetched. It will be merged with the current configuration.</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="947"/> <location filename="../../core/App.cpp" line="985"/>
<source>command_line_option_config_to_fetch_arg</source> <source>command_line_option_config_to_fetch_arg</source>
<extracomment>&quot;URL, path or file&quot;</extracomment> <extracomment>&quot;URL, path or file&quot;</extracomment>
<translation>URL, path or file</translation> <translation>URL, path or file</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="952"/> <location filename="../../core/App.cpp" line="990"/>
<source>command_line_option_minimized</source> <source>command_line_option_minimized</source>
<translation>Minimiser</translation> <translation>Minimiser</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="955"/> <location filename="../../core/App.cpp" line="993"/>
<source>command_line_option_log_to_stdout</source> <source>command_line_option_log_to_stdout</source>
<translation>Log to stdout some debug information while running</translation> <translation>Log to stdout some debug information while running</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="958"/> <location filename="../../core/App.cpp" line="996"/>
<source>command_line_option_print_app_logs_only</source> <source>command_line_option_print_app_logs_only</source>
<extracomment>&quot;Print only logs from the application&quot;</extracomment> <extracomment>&quot;Print only logs from the application&quot;</extracomment>
<translation>Print only logs from the application</translation> <translation>Print only logs from the application</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1329"/> <location filename="../../core/App.cpp" line="1367"/>
<source>hide_action</source> <source>hide_action</source>
<extracomment>&quot;Cacher&quot; &quot;Afficher&quot;</extracomment> <extracomment>&quot;Cacher&quot; &quot;Afficher&quot;</extracomment>
<translation>Cacher</translation> <translation>Cacher</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1329"/> <location filename="../../core/App.cpp" line="1367"/>
<source>show_action</source> <source>show_action</source>
<translation>Afficher</translation> <translation>Afficher</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1344"/> <location filename="../../core/App.cpp" line="1382"/>
<source>quit_action</source> <source>quit_action</source>
<extracomment>&quot;Quitter&quot;</extracomment> <extracomment>&quot;Quitter&quot;</extracomment>
<translation>Quitter</translation> <translation>Quitter</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1459"/> <location filename="../../core/App.cpp" line="1400"/>
<source>check_for_update</source>
<extracomment>Check for update</extracomment>
<translation>Rechercher une mise à jour</translation>
</message>
<message>
<location filename="../../core/App.cpp" line="1514"/>
<source>mark_all_read_action</source> <source>mark_all_read_action</source>
<translation>Marquer tout comme lu</translation> <translation>Marquer tout comme lu</translation>
</message> </message>
@ -1998,13 +2039,13 @@
<context> <context>
<name>ChatCore</name> <name>ChatCore</name>
<message> <message>
<location filename="../../core/chat/ChatCore.cpp" line="144"/> <location filename="../../core/chat/ChatCore.cpp" line="145"/>
<source>info_toast_deleted_title</source> <source>info_toast_deleted_title</source>
<extracomment>Deleted</extracomment> <extracomment>Deleted</extracomment>
<translation>Supprimé</translation> <translation>Supprimé</translation>
</message> </message>
<message> <message>
<location filename="../../core/chat/ChatCore.cpp" line="146"/> <location filename="../../core/chat/ChatCore.cpp" line="147"/>
<source>info_toast_deleted_message_history</source> <source>info_toast_deleted_message_history</source>
<extracomment>Message history has been deleted</extracomment> <extracomment>Message history has been deleted</extracomment>
<translation>L&apos;historique des messages a é supprimé</translation> <translation>L&apos;historique des messages a é supprimé</translation>
@ -3795,50 +3836,56 @@ Expiration : %1</translation>
<context> <context>
<name>HelpPage</name> <name>HelpPage</name>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="42"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="43"/>
<source>help_title</source> <source>help_title</source>
<extracomment>&quot;Aide&quot;</extracomment> <extracomment>&quot;Aide&quot;</extracomment>
<translation>Aide</translation> <translation>Aide</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="72"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="73"/>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="130"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="142"/>
<source>help_about_title</source> <source>help_about_title</source>
<extracomment>&quot;À propos de %1&quot;</extracomment> <extracomment>&quot;À propos de %1&quot;</extracomment>
<translation>À propos de %1</translation> <translation>À propos de %1</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="86"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="87"/>
<source>help_about_privacy_policy_title</source> <source>help_about_privacy_policy_title</source>
<extracomment>&quot;Règles de confidentialité&quot;</extracomment> <extracomment>&quot;Règles de confidentialité&quot;</extracomment>
<translation>Règles de confidentialité</translation> <translation>Règles de confidentialité</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="88"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="89"/>
<source>help_about_privacy_policy_subtitle</source> <source>help_about_privacy_policy_subtitle</source>
<extracomment>Quelles informations %1 collecte et utilise</extracomment> <extracomment>Quelles informations %1 collecte et utilise</extracomment>
<translation>Quelles informations %1 collecte et utilise</translation> <translation>Quelles informations %1 collecte et utilise</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="98"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="101"/>
<source>help_about_version_title</source> <source>help_about_version_title</source>
<extracomment>&quot;Version&quot;</extracomment> <extracomment>&quot;Version&quot;</extracomment>
<translation>Version</translation> <translation>Version</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="106"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="110"/>
<source>help_check_for_update_button_label</source>
<extracomment>Check update</extracomment>
<translation>Rechercher une mise à jour</translation>
</message>
<message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="118"/>
<source>help_about_gpl_licence_title</source> <source>help_about_gpl_licence_title</source>
<extracomment>&quot;Licences GPLv3&quot;</extracomment> <extracomment>&quot;Licences GPLv3&quot;</extracomment>
<translation>Licences GPLv3</translation> <translation>Licences GPLv3</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="117"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="129"/>
<source>help_about_contribute_translations_title</source> <source>help_about_contribute_translations_title</source>
<extracomment>&quot;Contribuer à la traduction de %1&quot;</extracomment> <extracomment>&quot;Contribuer à la traduction de %1&quot;</extracomment>
<translation>Contribuer à la traduction de %1</translation> <translation>Contribuer à la traduction de %1</translation>
</message> </message>
<message> <message>
<location filename="../../view/Page/Main/Help/HelpPage.qml" line="142"/> <location filename="../../view/Page/Main/Help/HelpPage.qml" line="154"/>
<source>help_troubleshooting_title</source> <source>help_troubleshooting_title</source>
<extracomment>&quot;Dépannage&quot;</extracomment> <extracomment>&quot;Dépannage&quot;</extracomment>
<translation>Dépannage</translation> <translation>Dépannage</translation>

View file

@ -368,6 +368,17 @@ void CoreModel::searchInMagicSearch(QString filter,
mMagicSearch->search(filter, sourceFlags, aggregation, maxResults); mMagicSearch->search(filter, sourceFlags, aggregation, maxResults);
} }
void CoreModel::checkForUpdate(const std::string &applicationVersion, bool requestedByUser) {
mCheckVersionRequestedByUser = requestedByUser;
if (SettingsModel::getInstance()->isCheckForUpdateEnabled()) {
CoreModel::getInstance()->getCore()->checkForUpdate(applicationVersion);
}
}
bool CoreModel::isCheckVersionRequestedByUser() const {
return mCheckVersionRequestedByUser;
}
//--------------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------------
void CoreModel::onAccountAdded(const std::shared_ptr<linphone::Core> &core, void CoreModel::onAccountAdded(const std::shared_ptr<linphone::Core> &core,
@ -585,7 +596,7 @@ void CoreModel::onVersionUpdateCheckResultReceived(const std::shared_ptr<linphon
linphone::VersionUpdateCheckResult result, linphone::VersionUpdateCheckResult result,
const std::string &version, const std::string &version,
const std::string &url) { const std::string &url) {
emit versionUpdateCheckResultReceived(core, result, version, url); emit versionUpdateCheckResultReceived(core, result, version, url, mCheckVersionRequestedByUser);
} }
void CoreModel::onFriendListRemoved(const std::shared_ptr<linphone::Core> &core, void CoreModel::onFriendListRemoved(const std::shared_ptr<linphone::Core> &core,

View file

@ -71,6 +71,9 @@ public:
LinphoneEnums::MagicSearchAggregation aggregation, LinphoneEnums::MagicSearchAggregation aggregation,
int maxResults); int maxResults);
void checkForUpdate(const std::string &applicationVersion, bool requestedByUser = false);
bool isCheckVersionRequestedByUser() const;
bool mEnd = false; bool mEnd = false;
linphone::ConfiguringState mConfigStatus; linphone::ConfiguringState mConfigStatus;
QString mConfigMessage; QString mConfigMessage;
@ -97,6 +100,7 @@ private:
QMap<QString, OIDCModel *> mOpenIdConnections; QMap<QString, OIDCModel *> mOpenIdConnections;
std::shared_ptr<MagicSearchModel> mMagicSearch; std::shared_ptr<MagicSearchModel> mMagicSearch;
bool mStarted = false; bool mStarted = false;
bool mCheckVersionRequestedByUser = false;
void setPathBeforeCreation(); void setPathBeforeCreation();
void setPathsAfterCreation(); void setPathsAfterCreation();
@ -281,7 +285,8 @@ signals:
void versionUpdateCheckResultReceived(const std::shared_ptr<linphone::Core> &core, void versionUpdateCheckResultReceived(const std::shared_ptr<linphone::Core> &core,
linphone::VersionUpdateCheckResult result, linphone::VersionUpdateCheckResult result,
const std::string &version, const std::string &version,
const std::string &url); const std::string &url,
bool checkRequestedByUser);
void friendListRemoved(const std::shared_ptr<linphone::Core> &core, void friendListRemoved(const std::shared_ptr<linphone::Core> &core,
const std::shared_ptr<linphone::FriendList> &friendList); const std::shared_ptr<linphone::FriendList> &friendList);
}; };

View file

@ -855,6 +855,40 @@ bool SettingsModel::getDisableMeetingsFeature() const {
return !!mConfig->getInt(UiSection, "disable_meetings_feature", 0); return !!mConfig->getInt(UiSection, "disable_meetings_feature", 0);
} }
bool SettingsModel::isCheckForUpdateAvailable() const {
#ifdef ENABLE_UPDATE_CHECK
return true;
#else
return false;
#endif
}
bool SettingsModel::isCheckForUpdateEnabled() const {
return !!mConfig->getInt(UiSection, "check_for_update_enabled", isCheckForUpdateAvailable());
}
void SettingsModel::setCheckForUpdateEnabled(bool enable) {
mConfig->setInt(UiSection, "check_for_update_enabled", enable);
emit checkForUpdateEnabledChanged();
}
QString SettingsModel::getVersionCheckUrl() {
auto url = mConfig->getString("misc", "version_check_url_root", "");
if (url == "") {
url = Constants::VersionCheckReleaseUrl;
if (url != "") mConfig->setString("misc", "version_check_url_root", url);
}
return Utils::coreStringToAppString(url);
}
void SettingsModel::setVersionCheckUrl(const QString &url) {
if (url != getVersionCheckUrl()) {
// Do not trim the url before because we want to update GUI from potential auto fix.
mConfig->setString("misc", "version_check_url_root", Utils::appStringToCoreString(url.trimmed()));
emit versionCheckUrlChanged();
}
}
void SettingsModel::setChatNotificationSoundPath(const QString &path) { void SettingsModel::setChatNotificationSoundPath(const QString &path) {
QString cleanedPath = QDir::cleanPath(path); QString cleanedPath = QDir::cleanPath(path);
mConfig->setString(UiSection, "chat_sound_notification_file", Utils::appStringToCoreString(cleanedPath)); mConfig->setString(UiSection, "chat_sound_notification_file", Utils::appStringToCoreString(cleanedPath));

View file

@ -22,6 +22,7 @@
#define SETTINGS_MODEL_H_ #define SETTINGS_MODEL_H_
#include "MediastreamerUtils.hpp" #include "MediastreamerUtils.hpp"
#include "tool/LinphoneEnums.hpp"
#include <QFont> #include <QFont>
#include <QObject> #include <QObject>
#include <QVariantMap> #include <QVariantMap>
@ -186,6 +187,13 @@ public:
void setDisableMeetingsFeature(bool value); void setDisableMeetingsFeature(bool value);
bool getDisableMeetingsFeature() const; bool getDisableMeetingsFeature() const;
bool isCheckForUpdateAvailable() const;
bool isCheckForUpdateEnabled() const;
void setCheckForUpdateEnabled(bool enable);
QString getVersionCheckUrl();
void setVersionCheckUrl(const QString &url);
void setVersionCheckType(const LinphoneEnums::VersionCheckType &type);
// UI // UI
DECLARE_GETSET(bool, disableChatFeature, DisableChatFeature) DECLARE_GETSET(bool, disableChatFeature, DisableChatFeature)
DECLARE_GETSET(bool, disableBroadcastFeature, DisableBroadcastFeature) DECLARE_GETSET(bool, disableBroadcastFeature, DisableBroadcastFeature)
@ -269,6 +277,9 @@ signals:
void disableMeetingsFeatureChanged(bool value); void disableMeetingsFeatureChanged(bool value);
void checkForUpdateEnabledChanged();
void versionCheckUrlChanged();
// Messages. -------------------------------------------------------------------- // Messages. --------------------------------------------------------------------
void autoDownloadReceivedFilesChanged(bool enabled); void autoDownloadReceivedFilesChanged(bool enabled);

View file

@ -66,8 +66,8 @@ public:
static constexpr int DefaultExpires = 600; static constexpr int DefaultExpires = 600;
static constexpr int DefaultPublishExpires = 120; static constexpr int DefaultPublishExpires = 120;
static constexpr char DownloadUrl[] = "https://www.linphone.org/technical-corner/linphone"; static constexpr char DownloadUrl[] = "https://www.linphone.org/technical-corner/linphone";
static constexpr char VersionCheckReleaseUrl[] = "https://linphone.org/releases"; static constexpr char VersionCheckReleaseUrl[] = "https://download.linphone.org/releases";
static constexpr char VersionCheckNightlyUrl[] = "https://linphone.org/snapshots"; static constexpr char VersionCheckNightlyUrl[] = "https://download.linphone.org/snapshots";
static constexpr char PasswordRecoveryUrl[] = "https://subscribe.linphone.org/recovery/email"; static constexpr char PasswordRecoveryUrl[] = "https://subscribe.linphone.org/recovery/email";
static constexpr char CguUrl[] = "https://www.linphone.org/en/terms-of-use/"; static constexpr char CguUrl[] = "https://www.linphone.org/en/terms-of-use/";
static constexpr char PrivatePolicyUrl[] = "https://www.linphone.org/en/privacy-policy/"; static constexpr char PrivatePolicyUrl[] = "https://www.linphone.org/en/privacy-policy/";

View file

@ -399,6 +399,9 @@ LinphoneEnums::VideoSourceScreenSharingType fromLinphone(const linphone::VideoSo
enum class PlaybackState { PlayingState = 0, PausedState = 1, StoppedState = 2, ErrorState = 3 }; enum class PlaybackState { PlayingState = 0, PausedState = 1, StoppedState = 2, ErrorState = 3 };
Q_ENUM_NS(PlaybackState); Q_ENUM_NS(PlaybackState);
enum class VersionCheckType { Release = 0, Nightly = 1, Custom = 2 };
Q_ENUM_NS(VersionCheckType)
} // namespace LinphoneEnums } // namespace LinphoneEnums
/* /*
Q_DECLARE_METATYPE(LinphoneEnums::CallState) Q_DECLARE_METATYPE(LinphoneEnums::CallState)

View file

@ -139,6 +139,12 @@ Control.Button {
underline: mainItem.underline underline: mainItem.underline
bold: (mainItem.style === ButtonStyle.noBackground || mainItem.style === ButtonStyle.noBackgroundRed) && (mainItem.hovered || mainItem.pressed) bold: (mainItem.style === ButtonStyle.noBackground || mainItem.style === ButtonStyle.noBackgroundRed) && (mainItem.hovered || mainItem.pressed)
} }
ToolTip {
parent: mainItem
text: mainItem.text
visible: mainItem.hovered && (buttonText.implicitWidth > buttonText.width)
delay: 500
}
TextMetrics { TextMetrics {
id: textMetrics id: textMetrics
text: mainItem.text text: mainItem.text

View file

@ -36,10 +36,12 @@ MouseArea {
} }
ColumnLayout { ColumnLayout {
width: implicitWidth width: implicitWidth
Layout.preferredWidth: width
height: implicitHeight height: implicitHeight
Layout.leftMargin: Utils.getSizeWithScreenRatio(16) Layout.leftMargin: Utils.getSizeWithScreenRatio(16)
Text { Text {
Layout.fillWidth: true Layout.fillWidth: true
maximumLineCount: 1
text: mainItem.title text: mainItem.title
color: DefaultStyle.main2_600 color: DefaultStyle.main2_600
font: Typography.p2 font: Typography.p2
@ -49,6 +51,7 @@ MouseArea {
Text { Text {
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
verticalAlignment: Text.AlignTop verticalAlignment: Text.AlignTop
maximumLineCount: 2
Layout.fillWidth: true Layout.fillWidth: true
text: mainItem.subTitle text: mainItem.subTitle
color: DefaultStyle.main2_500_main color: DefaultStyle.main2_500_main

View file

@ -86,6 +86,7 @@ Popup {
text: mainItem.description text: mainItem.description
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: DefaultStyle.main2_500_main color: DefaultStyle.main2_500_main
onLinkActivated: Qt.openUrlExternally(link)
font { font {
pixelSize: Utils.getSizeWithScreenRatio(12) pixelSize: Utils.getSizeWithScreenRatio(12)
weight: Utils.getSizeWithScreenRatio(300) weight: Utils.getSizeWithScreenRatio(300)

View file

@ -21,14 +21,15 @@ AbstractMainPage {
id: leftPanel id: leftPanel
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
property real sideMargin: Utils.getSizeWithScreenRatio(45) property real leftMargin: Utils.getSizeWithScreenRatio(45)
property real rightMargin: Utils.getSizeWithScreenRatio(29)
spacing: Utils.getSizeWithScreenRatio(5) spacing: Utils.getSizeWithScreenRatio(5)
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: leftPanel.sideMargin Layout.leftMargin: leftPanel.leftMargin
Layout.rightMargin: leftPanel.sideMargin Layout.rightMargin: leftPanel.rightMargin
spacing: Utils.getSizeWithScreenRatio(5) spacing: Utils.getSizeWithScreenRatio(8)
Button { RoundButton {
icon.source: AppIcons.leftArrow icon.source: AppIcons.leftArrow
style: ButtonStyle.noBackground style: ButtonStyle.noBackground
icon.width: Utils.getSizeWithScreenRatio(24) icon.width: Utils.getSizeWithScreenRatio(24)
@ -51,8 +52,8 @@ AbstractMainPage {
id: aboutImage id: aboutImage
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: Utils.getSizeWithScreenRatio(100) Layout.preferredHeight: Utils.getSizeWithScreenRatio(100)
Layout.leftMargin: leftPanel.sideMargin Layout.leftMargin: leftPanel.leftMargin
Layout.rightMargin: leftPanel.sideMargin Layout.rightMargin: leftPanel.rightMargin
Layout.topMargin: Utils.getSizeWithScreenRatio(41) Layout.topMargin: Utils.getSizeWithScreenRatio(41)
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: SettingsCpp.themeAboutPictureUrl source: SettingsCpp.themeAboutPictureUrl
@ -64,8 +65,8 @@ AbstractMainPage {
} }
} }
Text { Text {
Layout.leftMargin: leftPanel.sideMargin Layout.leftMargin: leftPanel.leftMargin
Layout.rightMargin: leftPanel.sideMargin Layout.rightMargin: leftPanel.rightMargin
Layout.topMargin: Utils.getSizeWithScreenRatio(aboutImage.visible ? 41 : 24) Layout.topMargin: Utils.getSizeWithScreenRatio(aboutImage.visible ? 41 : 24)
Layout.fillWidth: true Layout.fillWidth: true
//: "À propos de %1" //: "À propos de %1"
@ -75,8 +76,8 @@ AbstractMainPage {
} }
ColumnLayout { ColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: leftPanel.sideMargin Layout.leftMargin: leftPanel.leftMargin
Layout.rightMargin: leftPanel.sideMargin Layout.rightMargin: leftPanel.rightMargin
Layout.topMargin: Utils.getSizeWithScreenRatio(24) Layout.topMargin: Utils.getSizeWithScreenRatio(24)
spacing: Utils.getSizeWithScreenRatio(32) spacing: Utils.getSizeWithScreenRatio(32)
HelpIconLabelButton { HelpIconLabelButton {
@ -91,13 +92,24 @@ AbstractMainPage {
Qt.openUrlExternally(ConstantsCpp.PrivatePolicyUrl) Qt.openUrlExternally(ConstantsCpp.PrivatePolicyUrl)
} }
} }
HelpIconLabelButton { RowLayout {
Layout.fillWidth: true HelpIconLabelButton {
iconSource: AppIcons.info Layout.preferredWidth: width
//: "Version" Layout.minimumWidth: width
title: qsTr("help_about_version_title") iconSource: AppIcons.info
subTitle: AppCpp.shortApplicationVersion //: "Version"
onClicked: {} title: qsTr("help_about_version_title")
subTitle: AppCpp.shortApplicationVersion
onClicked: {}
}
Item{Layout.fillWidth: true}
MediumButton {
style: ButtonStyle.tertiary
Layout.fillWidth: true
//: Check update
text: qsTr("help_check_for_update_button_label")
onClicked: AppCpp.checkForUpdate(true)
}
} }
HelpIconLabelButton { HelpIconLabelButton {
Layout.fillWidth: true Layout.fillWidth: true
@ -122,8 +134,8 @@ AbstractMainPage {
} }
} }
Text { Text {
Layout.leftMargin: leftPanel.sideMargin Layout.leftMargin: leftPanel.leftMargin
Layout.rightMargin: leftPanel.sideMargin Layout.rightMargin: leftPanel.rightMargin
Layout.topMargin: Utils.getSizeWithScreenRatio(32) Layout.topMargin: Utils.getSizeWithScreenRatio(32)
Layout.fillWidth: true Layout.fillWidth: true
//: "À propos de %1" //: "À propos de %1"
@ -134,8 +146,8 @@ AbstractMainPage {
HelpIconLabelButton { HelpIconLabelButton {
id: troubleShooting id: troubleShooting
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: leftPanel.sideMargin Layout.leftMargin: leftPanel.leftMargin
Layout.rightMargin: leftPanel.sideMargin Layout.rightMargin: leftPanel.rightMargin
Layout.topMargin: Utils.getSizeWithScreenRatio(24) Layout.topMargin: Utils.getSizeWithScreenRatio(24)
iconSource: AppIcons.debug iconSource: AppIcons.debug
//: "Dépannage" //: "Dépannage"

View file

@ -51,8 +51,8 @@ QtObject {
property color vue_meter_light_green: "#6FF88D" property color vue_meter_light_green: "#6FF88D"
property color vue_meter_dark_green: "#00D916" property color vue_meter_dark_green: "#00D916"
property real defaultHeight: 1080.0 property real defaultHeight: 1007.0
property real defaultWidth: 1920.0 property real defaultWidth: 1512.0
property real maxDp: 0.98 property real maxDp: 0.98
property real dp: Math.min((Screen.width/Screen.height)/(defaultWidth/defaultHeight), maxDp) property real dp: Math.min((Screen.width/Screen.height)/(defaultWidth/defaultHeight), maxDp)