mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
update download folder after settings created #LINQT-2402
This commit is contained in:
parent
158f640731
commit
b2e859de06
6 changed files with 71 additions and 64 deletions
|
|
@ -645,6 +645,8 @@ void App::initCore() {
|
|||
SettingsModel::create();
|
||||
lDebug() << log().arg("Creating SettingsCore");
|
||||
settings = SettingsCore::create();
|
||||
// Update the download folder if set in the configuration file
|
||||
CoreModel::getInstance()->setPathsAfterCreation();
|
||||
lDebug() << log().arg("Checking downloaded codecs updates");
|
||||
Utils::checkDownloadedCodecsUpdates();
|
||||
lDebug() << log().arg("Setting Video Codec Priority Policy");
|
||||
|
|
|
|||
|
|
@ -682,14 +682,14 @@
|
|||
<message>
|
||||
<location filename="../../core/App.cpp" line="425"/>
|
||||
<location filename="../../core/App.cpp" line="503"/>
|
||||
<location filename="../../core/App.cpp" line="789"/>
|
||||
<location filename="../../core/App.cpp" line="791"/>
|
||||
<source>info_popup_error_title</source>
|
||||
<extracomment>Error</extracomment>
|
||||
<translation>Fehler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="426"/>
|
||||
<location filename="../../core/App.cpp" line="791"/>
|
||||
<location filename="../../core/App.cpp" line="793"/>
|
||||
<source>info_popup_configuration_failed_message</source>
|
||||
<extracomment>Remote provisioning failed : %1</extracomment>
|
||||
<translation>Remote-Provisionierung fehlgeschlagen: %1</translation>
|
||||
|
|
@ -729,86 +729,86 @@
|
|||
<translation>Ihre Version ist auf dem neuesten Stand</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="785"/>
|
||||
<location filename="../../core/App.cpp" line="787"/>
|
||||
<source>configuration_error_detail</source>
|
||||
<extracomment>not reachable</extracomment>
|
||||
<translation>nicht erreichbar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1076"/>
|
||||
<location filename="../../core/App.cpp" line="1078"/>
|
||||
<source>application_description</source>
|
||||
<extracomment>"A free and open source SIP video-phone."</extracomment>
|
||||
<translation>Ein kostenloses Open-Source SIP Video-Telefon.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1078"/>
|
||||
<location filename="../../core/App.cpp" line="1080"/>
|
||||
<source>command_line_arg_order</source>
|
||||
<extracomment>"Send an order to the application towards a command line"</extracomment>
|
||||
<translation>Kommandozeilen-Befehl an die Anwendung schicken</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1082"/>
|
||||
<location filename="../../core/App.cpp" line="1084"/>
|
||||
<source>command_line_option_show_help</source>
|
||||
<translation>Zeige Hilfe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1087"/>
|
||||
<location filename="../../core/App.cpp" line="1089"/>
|
||||
<source>command_line_option_show_app_version</source>
|
||||
<translation>App-Version anzeigen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1095"/>
|
||||
<location filename="../../core/App.cpp" line="1097"/>
|
||||
<source>command_line_option_config_to_fetch</source>
|
||||
<extracomment>"Specify the linphone configuration file to be fetched. It will be merged with the current configuration."</extracomment>
|
||||
<translation>Abzurufende Linphone-Konfigurationsdatei angeben. Sie wird mit der aktuellen Konfiguration zusammengeführt.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1097"/>
|
||||
<location filename="../../core/App.cpp" line="1099"/>
|
||||
<source>command_line_option_config_to_fetch_arg</source>
|
||||
<extracomment>"URL, path or file"</extracomment>
|
||||
<translation>URL, Pfad oder Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1102"/>
|
||||
<location filename="../../core/App.cpp" line="1104"/>
|
||||
<source>command_line_option_minimized</source>
|
||||
<translation>Minimieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1105"/>
|
||||
<location filename="../../core/App.cpp" line="1107"/>
|
||||
<source>command_line_option_log_to_stdout</source>
|
||||
<translation>Debug-Informationen auf der Standardausgabe ausgeben</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1108"/>
|
||||
<location filename="../../core/App.cpp" line="1110"/>
|
||||
<source>command_line_option_print_app_logs_only</source>
|
||||
<extracomment>"Print only logs from the application"</extracomment>
|
||||
<translation>Nur Anwendungs-Logs ausgeben</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1575"/>
|
||||
<location filename="../../core/App.cpp" line="1577"/>
|
||||
<source>hide_action</source>
|
||||
<extracomment>"Cacher" "Afficher"</extracomment>
|
||||
<translation>Ausblenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1575"/>
|
||||
<location filename="../../core/App.cpp" line="1577"/>
|
||||
<source>show_action</source>
|
||||
<translation>Zeigen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1590"/>
|
||||
<location filename="../../core/App.cpp" line="1592"/>
|
||||
<source>quit_action</source>
|
||||
<extracomment>"Quitter"</extracomment>
|
||||
<translation>Beenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1608"/>
|
||||
<location filename="../../core/App.cpp" line="1610"/>
|
||||
<source>check_for_update</source>
|
||||
<extracomment>Check for update</extracomment>
|
||||
<translation>Auf Updates prüfen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1731"/>
|
||||
<location filename="../../core/App.cpp" line="1733"/>
|
||||
<source>mark_all_read_action</source>
|
||||
<translation>Alle als gelesen markieren</translation>
|
||||
</message>
|
||||
|
|
@ -3591,12 +3591,12 @@ Stellen Sie sicher, dass Sie keine sensiblen Informationen teilen!</translation>
|
|||
<context>
|
||||
<name>CoreModel</name>
|
||||
<message>
|
||||
<location filename="../../model/core/CoreModel.cpp" line="215"/>
|
||||
<location filename="../../model/core/CoreModel.cpp" line="220"/>
|
||||
<source>info_popup_error_title</source>
|
||||
<translation>Fehler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../model/core/CoreModel.cpp" line="217"/>
|
||||
<location filename="../../model/core/CoreModel.cpp" line="222"/>
|
||||
<source>fetching_config_failed_error_message</source>
|
||||
<extracomment>"Remote provisioning cannot be retrieved"</extracomment>
|
||||
<translation>Die externe Bereitstellung kann nicht abgerufen werden</translation>
|
||||
|
|
|
|||
|
|
@ -663,14 +663,14 @@
|
|||
<message>
|
||||
<location filename="../../core/App.cpp" line="425"/>
|
||||
<location filename="../../core/App.cpp" line="503"/>
|
||||
<location filename="../../core/App.cpp" line="789"/>
|
||||
<location filename="../../core/App.cpp" line="791"/>
|
||||
<source>info_popup_error_title</source>
|
||||
<extracomment>Error</extracomment>
|
||||
<translation>Error</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="426"/>
|
||||
<location filename="../../core/App.cpp" line="791"/>
|
||||
<location filename="../../core/App.cpp" line="793"/>
|
||||
<source>info_popup_configuration_failed_message</source>
|
||||
<extracomment>Remote provisioning failed : %1</extracomment>
|
||||
<translation>Remote provisioning failed : %1</translation>
|
||||
|
|
@ -710,86 +710,86 @@
|
|||
<translation>Up to date Your version is up to date</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="785"/>
|
||||
<location filename="../../core/App.cpp" line="787"/>
|
||||
<source>configuration_error_detail</source>
|
||||
<extracomment>not reachable</extracomment>
|
||||
<translation>not reachable</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1076"/>
|
||||
<location filename="../../core/App.cpp" line="1078"/>
|
||||
<source>application_description</source>
|
||||
<extracomment>"A free and open source SIP video-phone."</extracomment>
|
||||
<translation>A free and open source SIP video-phone.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1078"/>
|
||||
<location filename="../../core/App.cpp" line="1080"/>
|
||||
<source>command_line_arg_order</source>
|
||||
<extracomment>"Send an order to the application towards a command line"</extracomment>
|
||||
<translation>Send an order to the application towards a command line</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1082"/>
|
||||
<location filename="../../core/App.cpp" line="1084"/>
|
||||
<source>command_line_option_show_help</source>
|
||||
<translation>Show this help</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1087"/>
|
||||
<location filename="../../core/App.cpp" line="1089"/>
|
||||
<source>command_line_option_show_app_version</source>
|
||||
<translation>Show app version</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1095"/>
|
||||
<location filename="../../core/App.cpp" line="1097"/>
|
||||
<source>command_line_option_config_to_fetch</source>
|
||||
<extracomment>"Specify the linphone configuration file to be fetched. It will be merged with the current configuration."</extracomment>
|
||||
<translation>Specify the linphone configuration file to be fetched. It will be merged with the current configuration.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1097"/>
|
||||
<location filename="../../core/App.cpp" line="1099"/>
|
||||
<source>command_line_option_config_to_fetch_arg</source>
|
||||
<extracomment>"URL, path or file"</extracomment>
|
||||
<translation>URL, path or file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1102"/>
|
||||
<location filename="../../core/App.cpp" line="1104"/>
|
||||
<source>command_line_option_minimized</source>
|
||||
<translation>Minimize</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1105"/>
|
||||
<location filename="../../core/App.cpp" line="1107"/>
|
||||
<source>command_line_option_log_to_stdout</source>
|
||||
<translation>Log to stdout some debug information while running</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1108"/>
|
||||
<location filename="../../core/App.cpp" line="1110"/>
|
||||
<source>command_line_option_print_app_logs_only</source>
|
||||
<extracomment>"Print only logs from the application"</extracomment>
|
||||
<translation>Print only logs from the application</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1575"/>
|
||||
<location filename="../../core/App.cpp" line="1577"/>
|
||||
<source>hide_action</source>
|
||||
<extracomment>"Cacher" "Afficher"</extracomment>
|
||||
<translation>Hide</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1575"/>
|
||||
<location filename="../../core/App.cpp" line="1577"/>
|
||||
<source>show_action</source>
|
||||
<translation>Show</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1590"/>
|
||||
<location filename="../../core/App.cpp" line="1592"/>
|
||||
<source>quit_action</source>
|
||||
<extracomment>"Quitter"</extracomment>
|
||||
<translation>Quit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1608"/>
|
||||
<location filename="../../core/App.cpp" line="1610"/>
|
||||
<source>check_for_update</source>
|
||||
<extracomment>Check for update</extracomment>
|
||||
<translation>Check for update</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1731"/>
|
||||
<location filename="../../core/App.cpp" line="1733"/>
|
||||
<source>mark_all_read_action</source>
|
||||
<translation>Marquer tout comme lu</translation>
|
||||
</message>
|
||||
|
|
@ -3494,12 +3494,12 @@ Only your correspondent can decrypt them.</translation>
|
|||
<context>
|
||||
<name>CoreModel</name>
|
||||
<message>
|
||||
<location filename="../../model/core/CoreModel.cpp" line="215"/>
|
||||
<location filename="../../model/core/CoreModel.cpp" line="220"/>
|
||||
<source>info_popup_error_title</source>
|
||||
<translation>Error</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../model/core/CoreModel.cpp" line="217"/>
|
||||
<location filename="../../model/core/CoreModel.cpp" line="222"/>
|
||||
<source>fetching_config_failed_error_message</source>
|
||||
<extracomment>"Remote provisioning cannot be retrieved"</extracomment>
|
||||
<translation>Remote provisioning cannot be retrieved</translation>
|
||||
|
|
|
|||
|
|
@ -658,14 +658,14 @@
|
|||
<message>
|
||||
<location filename="../../core/App.cpp" line="425"/>
|
||||
<location filename="../../core/App.cpp" line="503"/>
|
||||
<location filename="../../core/App.cpp" line="789"/>
|
||||
<location filename="../../core/App.cpp" line="791"/>
|
||||
<source>info_popup_error_title</source>
|
||||
<extracomment>Error</extracomment>
|
||||
<translation>Erreur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="426"/>
|
||||
<location filename="../../core/App.cpp" line="791"/>
|
||||
<location filename="../../core/App.cpp" line="793"/>
|
||||
<source>info_popup_configuration_failed_message</source>
|
||||
<extracomment>Remote provisioning failed : %1</extracomment>
|
||||
<translation>La configuration distante a échoué : %1</translation>
|
||||
|
|
@ -705,86 +705,86 @@
|
|||
<translation>Votre version est à jour</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="785"/>
|
||||
<location filename="../../core/App.cpp" line="787"/>
|
||||
<source>configuration_error_detail</source>
|
||||
<extracomment>not reachable</extracomment>
|
||||
<translation>indisponible</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1076"/>
|
||||
<location filename="../../core/App.cpp" line="1078"/>
|
||||
<source>application_description</source>
|
||||
<extracomment>"A free and open source SIP video-phone."</extracomment>
|
||||
<translation>A free and open source SIP video-phone.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1078"/>
|
||||
<location filename="../../core/App.cpp" line="1080"/>
|
||||
<source>command_line_arg_order</source>
|
||||
<extracomment>"Send an order to the application towards a command line"</extracomment>
|
||||
<translation>Send an order to the application towards a command line</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1082"/>
|
||||
<location filename="../../core/App.cpp" line="1084"/>
|
||||
<source>command_line_option_show_help</source>
|
||||
<translation>Show this help</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1087"/>
|
||||
<location filename="../../core/App.cpp" line="1089"/>
|
||||
<source>command_line_option_show_app_version</source>
|
||||
<translation>Afficher la version de l'application</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1095"/>
|
||||
<location filename="../../core/App.cpp" line="1097"/>
|
||||
<source>command_line_option_config_to_fetch</source>
|
||||
<extracomment>"Specify the linphone configuration file to be fetched. It will be merged with the current configuration."</extracomment>
|
||||
<translation>Specify the linphone configuration file to be fetched. It will be merged with the current configuration.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1097"/>
|
||||
<location filename="../../core/App.cpp" line="1099"/>
|
||||
<source>command_line_option_config_to_fetch_arg</source>
|
||||
<extracomment>"URL, path or file"</extracomment>
|
||||
<translation>URL, path or file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1102"/>
|
||||
<location filename="../../core/App.cpp" line="1104"/>
|
||||
<source>command_line_option_minimized</source>
|
||||
<translation>Minimiser</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1105"/>
|
||||
<location filename="../../core/App.cpp" line="1107"/>
|
||||
<source>command_line_option_log_to_stdout</source>
|
||||
<translation>Log to stdout some debug information while running</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1108"/>
|
||||
<location filename="../../core/App.cpp" line="1110"/>
|
||||
<source>command_line_option_print_app_logs_only</source>
|
||||
<extracomment>"Print only logs from the application"</extracomment>
|
||||
<translation>Print only logs from the application</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1575"/>
|
||||
<location filename="../../core/App.cpp" line="1577"/>
|
||||
<source>hide_action</source>
|
||||
<extracomment>"Cacher" "Afficher"</extracomment>
|
||||
<translation>Cacher</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1575"/>
|
||||
<location filename="../../core/App.cpp" line="1577"/>
|
||||
<source>show_action</source>
|
||||
<translation>Afficher</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1590"/>
|
||||
<location filename="../../core/App.cpp" line="1592"/>
|
||||
<source>quit_action</source>
|
||||
<extracomment>"Quitter"</extracomment>
|
||||
<translation>Quitter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1608"/>
|
||||
<location filename="../../core/App.cpp" line="1610"/>
|
||||
<source>check_for_update</source>
|
||||
<extracomment>Check for update</extracomment>
|
||||
<translation>Rechercher une mise à jour</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/App.cpp" line="1731"/>
|
||||
<location filename="../../core/App.cpp" line="1733"/>
|
||||
<source>mark_all_read_action</source>
|
||||
<translation>Marquer tout comme lu</translation>
|
||||
</message>
|
||||
|
|
@ -3469,12 +3469,12 @@ en bout. Seul votre correspondant peut les déchiffrer.</translation>
|
|||
<context>
|
||||
<name>CoreModel</name>
|
||||
<message>
|
||||
<location filename="../../model/core/CoreModel.cpp" line="215"/>
|
||||
<location filename="../../model/core/CoreModel.cpp" line="220"/>
|
||||
<source>info_popup_error_title</source>
|
||||
<translation>Erreur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../model/core/CoreModel.cpp" line="217"/>
|
||||
<location filename="../../model/core/CoreModel.cpp" line="222"/>
|
||||
<source>fetching_config_failed_error_message</source>
|
||||
<extracomment>"Remote provisioning cannot be retrieved"</extracomment>
|
||||
<translation>La configuration distante n'a pas pu être récupérée</translation>
|
||||
|
|
|
|||
|
|
@ -174,12 +174,17 @@ void CoreModel::setPathBeforeCreation() {
|
|||
}
|
||||
|
||||
void CoreModel::setPathsAfterCreation() {
|
||||
auto friendsPath = Paths::getFriendsListFilePath();
|
||||
if (!friendsPath.isEmpty() && QFileInfo(friendsPath).exists()) {
|
||||
lInfo() << log().arg("Using old friends database at %1").arg(friendsPath);
|
||||
std::shared_ptr<linphone::Config> config = mCore->getConfig();
|
||||
config->setString("storage", "friends_db_uri", Utils::appStringToCoreString(friendsPath));
|
||||
}
|
||||
// auto friendsPath = Paths::getFriendsListFilePath();
|
||||
// if (!friendsPath.isEmpty() && QFileInfo(friendsPath).exists()) {
|
||||
// lInfo() << log().arg("Using old friends database at %1").arg(friendsPath);
|
||||
// std::shared_ptr<linphone::Config> config = mCore->getConfig();
|
||||
// config->setString("storage", "friends_db_uri", Utils::appStringToCoreString(friendsPath));
|
||||
// }
|
||||
std::shared_ptr<linphone::Factory> factory = linphone::Factory::get();
|
||||
QString downloadFolder = SettingsModel::getInstance()->getDownloadFolder();
|
||||
if (downloadFolder.isEmpty()) downloadFolder = Paths::getDownloadDirPath();
|
||||
if (!downloadFolder.endsWith(QDir::separator())) downloadFolder.append(QDir::separator());
|
||||
SET_FACTORY_PATH(Download, (downloadFolder));
|
||||
}
|
||||
|
||||
void CoreModel::setPathAfterStart() {
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public:
|
|||
|
||||
void start();
|
||||
void setConfigPath(QString path);
|
||||
void setPathsAfterCreation();
|
||||
|
||||
void refreshOidcRemainingTime();
|
||||
|
||||
|
|
@ -112,7 +113,6 @@ private:
|
|||
bool mCheckVersionRequestedByUser = false;
|
||||
|
||||
void setPathBeforeCreation();
|
||||
void setPathsAfterCreation();
|
||||
void setPathAfterStart();
|
||||
|
||||
static std::shared_ptr<CoreModel> gCoreModel;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue