mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
fix check for update root url #LINQT-2177
This commit is contained in:
parent
514c337192
commit
bba3edd4b6
5 changed files with 16 additions and 11 deletions
|
|
@ -438,11 +438,10 @@ void App::setSelf(QSharedPointer<App>(me)) {
|
|||
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);
|
||||
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 =
|
||||
|
|
@ -1398,7 +1397,7 @@ void App::setSysTrayIcon() {
|
|||
//: Check for update
|
||||
if (mSettings->isCheckForUpdateAvailable()) {
|
||||
QAction *checkForUpdateAction = new QAction(tr("check_for_update"), root);
|
||||
root->connect(checkForUpdateAction, &QAction::triggered, this, [this] { checkForUpdate(); });
|
||||
root->connect(checkForUpdateAction, &QAction::triggered, this, [this] { checkForUpdate(true); });
|
||||
menu->addAction(checkForUpdateAction);
|
||||
}
|
||||
menu->addAction(quitAction);
|
||||
|
|
|
|||
|
|
@ -788,7 +788,7 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1518"/>
|
||||
<location filename="../../core/App.cpp" line="1519"/>
|
||||
<source>mark_all_read_action</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
|||
|
|
@ -783,7 +783,7 @@
|
|||
<translation>Check for update</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1518"/>
|
||||
<location filename="../../core/App.cpp" line="1519"/>
|
||||
<source>mark_all_read_action</source>
|
||||
<translation>Marquer tout comme lu</translation>
|
||||
</message>
|
||||
|
|
|
|||
|
|
@ -783,7 +783,7 @@
|
|||
<translation>Rechercher une mise à jour</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1518"/>
|
||||
<location filename="../../core/App.cpp" line="1519"/>
|
||||
<source>mark_all_read_action</source>
|
||||
<translation>Marquer tout comme lu</translation>
|
||||
</message>
|
||||
|
|
|
|||
|
|
@ -374,8 +374,14 @@ void CoreModel::searchInMagicSearch(QString filter,
|
|||
|
||||
void CoreModel::checkForUpdate(const std::string &applicationVersion, bool requestedByUser) {
|
||||
mCheckVersionRequestedByUser = requestedByUser;
|
||||
if (SettingsModel::getInstance()->isCheckForUpdateEnabled()) {
|
||||
CoreModel::getInstance()->getCore()->checkForUpdate(applicationVersion);
|
||||
auto settingsModel = SettingsModel::getInstance();
|
||||
if (settingsModel->isCheckForUpdateEnabled()) {
|
||||
if (settingsModel->getVersionCheckUrl().isEmpty())
|
||||
settingsModel->setVersionCheckUrl(Constants::VersionCheckReleaseUrl);
|
||||
lInfo() << log().arg("Checking for update for version") << applicationVersion;
|
||||
getCore()->checkForUpdate(applicationVersion);
|
||||
} else {
|
||||
lWarning() << log().arg("Check for update settings is not set");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue