wait for core to be started before initializing lists

This commit is contained in:
Gaelle Braud 2025-12-17 15:17:32 +01:00
parent 21312c99db
commit 44a3a90517
4 changed files with 74 additions and 67 deletions

View file

@ -620,23 +620,30 @@ void App::initCore() {
mNotifier = new Notifier(mEngine); mNotifier = new Notifier(mEngine);
mEngine->setObjectOwnership(settings.get(), QQmlEngine::CppOwnership); mEngine->setObjectOwnership(settings.get(), QQmlEngine::CppOwnership);
mEngine->setObjectOwnership(this, QQmlEngine::CppOwnership); mEngine->setObjectOwnership(this, QQmlEngine::CppOwnership);
if (!mAccountList) setAccountList(AccountList::create());
else { connect(this, &App::coreStartedChanged, this, [this] {
mAccountList->setInitialized(false); if (mCoreStarted) {
mAccountList->lUpdate(true); if (!mAccountList) setAccountList(AccountList::create());
} else {
// Update global unread Notifications when an account updates his unread Notifications mAccountList->setInitialized(false);
connect(mAccountList.get(), &AccountList::unreadNotificationsChanged, this, [this]() { mAccountList->lUpdate(true);
lDebug() << "unreadNotificationsChanged of AccountList"; }
mCoreModelConnection->invokeToModel([this] { // Update global unread Notifications when an account updates his unread Notifications
int n = mEventCountNotifier->getCurrentEventCount(); connect(mAccountList.get(), &AccountList::unreadNotificationsChanged, this, [this]() {
mCoreModelConnection->invokeToCore([this, n] { mEventCountNotifier->notifyEventCount(n); }); lDebug() << "unreadNotificationsChanged of AccountList";
}); mCoreModelConnection->invokeToModel([this] {
int n = mEventCountNotifier->getCurrentEventCount();
mCoreModelConnection->invokeToCore(
[this, n] { mEventCountNotifier->notifyEventCount(n); });
});
});
if (!mCallList) setCallList(CallList::create());
else mCallList->lUpdate();
if (!mChatList) setChatList(ChatList::create());
else mChatList->lUpdate();
disconnect(this, &App::coreStartedChanged, this, nullptr);
}
}); });
if (!mCallList) setCallList(CallList::create());
else mCallList->lUpdate();
if (!mChatList) setChatList(ChatList::create());
else mChatList->lUpdate();
if (!mSettings) { if (!mSettings) {
mSettings = settings; mSettings = settings;

View file

@ -682,14 +682,14 @@
<message> <message>
<location filename="../../core/App.cpp" line="392"/> <location filename="../../core/App.cpp" line="392"/>
<location filename="../../core/App.cpp" line="445"/> <location filename="../../core/App.cpp" line="445"/>
<location filename="../../core/App.cpp" line="701"/> <location filename="../../core/App.cpp" line="708"/>
<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="393"/> <location filename="../../core/App.cpp" line="393"/>
<location filename="../../core/App.cpp" line="703"/> <location filename="../../core/App.cpp" line="710"/>
<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-Provisionierung fehlgeschlagen: %1</translation> <translation>Remote-Provisionierung fehlgeschlagen: %1</translation>
@ -729,86 +729,86 @@
<translation>Ihre Version ist auf dem neuesten Stand</translation> <translation>Ihre Version ist auf dem neuesten Stand</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="697"/> <location filename="../../core/App.cpp" line="704"/>
<source>configuration_error_detail</source> <source>configuration_error_detail</source>
<extracomment>not reachable</extracomment> <extracomment>not reachable</extracomment>
<translation>nicht erreichbar</translation> <translation>nicht erreichbar</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="975"/> <location filename="../../core/App.cpp" line="982"/>
<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="977"/> <location filename="../../core/App.cpp" line="984"/>
<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="981"/> <location filename="../../core/App.cpp" line="988"/>
<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="986"/> <location filename="../../core/App.cpp" line="993"/>
<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="994"/> <location filename="../../core/App.cpp" line="1001"/>
<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="996"/> <location filename="../../core/App.cpp" line="1003"/>
<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="1001"/> <location filename="../../core/App.cpp" line="1008"/>
<source>command_line_option_minimized</source> <source>command_line_option_minimized</source>
<translation>Minimieren</translation> <translation>Minimieren</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1004"/> <location filename="../../core/App.cpp" line="1011"/>
<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="1007"/> <location filename="../../core/App.cpp" line="1014"/>
<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="1439"/> <location filename="../../core/App.cpp" line="1446"/>
<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="1439"/> <location filename="../../core/App.cpp" line="1446"/>
<source>show_action</source> <source>show_action</source>
<translation>Zeigen</translation> <translation>Zeigen</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1454"/> <location filename="../../core/App.cpp" line="1461"/>
<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="1472"/> <location filename="../../core/App.cpp" line="1479"/>
<source>check_for_update</source> <source>check_for_update</source>
<extracomment>Check for update</extracomment> <extracomment>Check for update</extracomment>
<translation>Auf Updates prüfen</translation> <translation>Auf Updates prüfen</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1595"/> <location filename="../../core/App.cpp" line="1602"/>
<source>mark_all_read_action</source> <source>mark_all_read_action</source>
<translation>Alle als gelesen markieren</translation> <translation>Alle als gelesen markieren</translation>
</message> </message>

View file

@ -663,14 +663,14 @@
<message> <message>
<location filename="../../core/App.cpp" line="392"/> <location filename="../../core/App.cpp" line="392"/>
<location filename="../../core/App.cpp" line="445"/> <location filename="../../core/App.cpp" line="445"/>
<location filename="../../core/App.cpp" line="701"/> <location filename="../../core/App.cpp" line="708"/>
<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="393"/> <location filename="../../core/App.cpp" line="393"/>
<location filename="../../core/App.cpp" line="703"/> <location filename="../../core/App.cpp" line="710"/>
<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>
@ -710,86 +710,86 @@
<translation>Up to date Your version is up to date</translation> <translation>Up to date Your version is up to date</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="697"/> <location filename="../../core/App.cpp" line="704"/>
<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="975"/> <location filename="../../core/App.cpp" line="982"/>
<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="977"/> <location filename="../../core/App.cpp" line="984"/>
<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="981"/> <location filename="../../core/App.cpp" line="988"/>
<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="986"/> <location filename="../../core/App.cpp" line="993"/>
<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="994"/> <location filename="../../core/App.cpp" line="1001"/>
<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="996"/> <location filename="../../core/App.cpp" line="1003"/>
<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="1001"/> <location filename="../../core/App.cpp" line="1008"/>
<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="1004"/> <location filename="../../core/App.cpp" line="1011"/>
<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="1007"/> <location filename="../../core/App.cpp" line="1014"/>
<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="1439"/> <location filename="../../core/App.cpp" line="1446"/>
<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="1439"/> <location filename="../../core/App.cpp" line="1446"/>
<source>show_action</source> <source>show_action</source>
<translation>Show</translation> <translation>Show</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1454"/> <location filename="../../core/App.cpp" line="1461"/>
<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="1472"/> <location filename="../../core/App.cpp" line="1479"/>
<source>check_for_update</source> <source>check_for_update</source>
<extracomment>Check for update</extracomment> <extracomment>Check for update</extracomment>
<translation>Check for update</translation> <translation>Check for update</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1595"/> <location filename="../../core/App.cpp" line="1602"/>
<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>

View file

@ -658,14 +658,14 @@
<message> <message>
<location filename="../../core/App.cpp" line="392"/> <location filename="../../core/App.cpp" line="392"/>
<location filename="../../core/App.cpp" line="445"/> <location filename="../../core/App.cpp" line="445"/>
<location filename="../../core/App.cpp" line="701"/> <location filename="../../core/App.cpp" line="708"/>
<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="393"/> <location filename="../../core/App.cpp" line="393"/>
<location filename="../../core/App.cpp" line="703"/> <location filename="../../core/App.cpp" line="710"/>
<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>
@ -705,86 +705,86 @@
<translation>Votre version est à jour</translation> <translation>Votre version est à jour</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="697"/> <location filename="../../core/App.cpp" line="704"/>
<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="975"/> <location filename="../../core/App.cpp" line="982"/>
<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="977"/> <location filename="../../core/App.cpp" line="984"/>
<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="981"/> <location filename="../../core/App.cpp" line="988"/>
<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="986"/> <location filename="../../core/App.cpp" line="993"/>
<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="994"/> <location filename="../../core/App.cpp" line="1001"/>
<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="996"/> <location filename="../../core/App.cpp" line="1003"/>
<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="1001"/> <location filename="../../core/App.cpp" line="1008"/>
<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="1004"/> <location filename="../../core/App.cpp" line="1011"/>
<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="1007"/> <location filename="../../core/App.cpp" line="1014"/>
<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="1439"/> <location filename="../../core/App.cpp" line="1446"/>
<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="1439"/> <location filename="../../core/App.cpp" line="1446"/>
<source>show_action</source> <source>show_action</source>
<translation>Afficher</translation> <translation>Afficher</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1454"/> <location filename="../../core/App.cpp" line="1461"/>
<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="1472"/> <location filename="../../core/App.cpp" line="1479"/>
<source>check_for_update</source> <source>check_for_update</source>
<extracomment>Check for update</extracomment> <extracomment>Check for update</extracomment>
<translation>Rechercher une mise à jour</translation> <translation>Rechercher une mise à jour</translation>
</message> </message>
<message> <message>
<location filename="../../core/App.cpp" line="1595"/> <location filename="../../core/App.cpp" line="1602"/>
<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>