diff --git a/Linphone/core/App.cpp b/Linphone/core/App.cpp index a9087ebe4..af9c327a1 100644 --- a/Linphone/core/App.cpp +++ b/Linphone/core/App.cpp @@ -343,13 +343,6 @@ App::App(int &argc, char *argv[]) connect(this, &App::restartCoreRequested, this, [this] { initCore(); - if (mCliModelConnection) mCliModelConnection->disconnect(); - if (mCoreModelConnection) { - mCoreModelConnection->disconnect(); - mCoreModelConnection->setModel(CoreModel::getInstance()); - } - // reset connections with the new CoreModel - resetConnections(); sendCommand(false); setIsRestarting(false); }); @@ -362,11 +355,6 @@ App::App(int &argc, char *argv[]) App::~App() { } -void App::resetConnections() { - connectCoreModel(); - connectCliModel(); -} - void App::connectCoreModel() { Q_ASSERT(mCoreModelConnection); mCoreModelConnection->makeConnectToModel(&CoreModel::callCreated, @@ -691,7 +679,11 @@ void App::init() { void App::initCore() { mustBeInMainThread(log().arg(Q_FUNC_INFO)); // Core. Manage the logger so it must be instantiate at first. - CoreModel::create("", mLinphoneThread); + if (!CoreModel::getInstance()) CoreModel::create("", mLinphoneThread); + else { + lDebug() << "CoreModel already exists, juste start core"; + // CoreModel::getInstance()->getCore()->start(); + } if (mParser->isSet("verbose")) QtLogger::enableVerbose(true); if (mParser->isSet("qt-logs-only")) QtLogger::enableQtOnly(true); qDebug() << "linphone thread is" << mLinphoneThread; @@ -769,14 +761,16 @@ void App::initCore() { mEngine->rootContext()->setContextProperty("executableName", EXECUTABLE_NAME); mEngine->rootContext()->setContextProperty("FocusNavigator", new FocusNavigator(mEngine)); - initCppInterfaces(); - mEngine->addImageProvider(ImageProvider::ProviderId, new ImageProvider()); - mEngine->addImageProvider(EmojiProvider::ProviderId, new EmojiProvider()); - mEngine->addImageProvider(AvatarProvider::ProviderId, new AvatarProvider()); - mEngine->addImageProvider(ScreenProvider::ProviderId, new ScreenProvider()); - mEngine->addImageProvider(WindowProvider::ProviderId, new WindowProvider()); - mEngine->addImageProvider(WindowIconProvider::ProviderId, new WindowIconProvider()); - mEngine->addImageProvider(ThumbnailProvider::ProviderId, new ThumbnailProvider()); + if (!isRestarting()) { + initCppInterfaces(); + mEngine->addImageProvider(ImageProvider::ProviderId, new ImageProvider()); + mEngine->addImageProvider(EmojiProvider::ProviderId, new EmojiProvider()); + mEngine->addImageProvider(AvatarProvider::ProviderId, new AvatarProvider()); + mEngine->addImageProvider(ScreenProvider::ProviderId, new ScreenProvider()); + mEngine->addImageProvider(WindowProvider::ProviderId, new WindowProvider()); + mEngine->addImageProvider(WindowIconProvider::ProviderId, new WindowIconProvider()); + mEngine->addImageProvider(ThumbnailProvider::ProviderId, new ThumbnailProvider()); + } // Enable notifications. if (!mNotifier) mNotifier = new Notifier(mEngine); @@ -1165,8 +1159,8 @@ void App::restartCore() { closeCallsWindow(); // setMainWindow(nullptr); setCoreStarted(false); - mEngine->clearComponentCache(); - mEngine->clearSingletons(); + // mEngine->clearComponentCache(); + // mEngine->clearSingletons(); // delete mEngine; // mEngine = nullptr; // clean(); diff --git a/Linphone/core/App.hpp b/Linphone/core/App.hpp index 3eaa1e174..b51418f5c 100644 --- a/Linphone/core/App.hpp +++ b/Linphone/core/App.hpp @@ -66,7 +66,6 @@ public: App(int &argc, char *argv[]); ~App(); void setSelf(QSharedPointer(me)); - void resetConnections(); void connectCoreModel(); void connectCliModel(); static App *getInstance(); diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index 825cd50b1..0626f0264 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -686,145 +686,145 @@ App - + remote_provisioning_dialog Voulez-vous télécharger et appliquer la configuration depuis cette adresse ? Möchten Sie die Remote-Konfiguration von dieser Adresse herunterladen und anwenden? + + - - - - + + info_popup_error_title Error Fehler - - + + info_popup_configuration_failed_message Remote provisioning failed : %1 Remote-Provisionierung fehlgeschlagen: %1 - + info_popup_error_checking_update An error occured while trying to check update. Please try again later or contact support team. Fehler bei der Update-Prüfung. Bitte später erneut versuchen oder Support-Team kontaktieren. - + info_popup_new_version_download_label Download it ! Herunterladen! - + info_popup_new_version_available_title New version available ! Neue Version verfügbar! - + info_popup_new_version_available_message A new version of Linphone (%1) is available. %2 Eine neue Version von Linphone (%1) ist unter %1 verfügbar - + info_popup_version_up_to_date_title Up to date Auf dem neuesten Stand - + info_popup_version_up_to_date_message Your version is up to date Ihre Version ist auf dem neuesten Stand - + configuration_error_detail not reachable nicht erreichbar - + application_description "A free and open source SIP video-phone." Ein kostenloses Open-Source SIP Video-Telefon. - + command_line_arg_order "Send an order to the application towards a command line" Kommandozeilen-Befehl an die Anwendung schicken - + command_line_option_show_help Zeige Hilfe - + command_line_option_show_app_version App-Version anzeigen - + command_line_option_config_to_fetch "Specify the linphone configuration file to be fetched. It will be merged with the current configuration." Abzurufende Linphone-Konfigurationsdatei angeben. Sie wird mit der aktuellen Konfiguration zusammengeführt. - + command_line_option_config_to_fetch_arg "URL, path or file" URL, Pfad oder Datei - + command_line_option_minimized Minimieren - + command_line_option_log_to_stdout Debug-Informationen auf der Standardausgabe ausgeben - + command_line_option_print_app_logs_only "Print only logs from the application" Nur Anwendungs-Logs ausgeben - + hide_action "Cacher" "Afficher" Ausblenden - + show_action Zeigen - + quit_action "Quitter" Beenden - + check_for_update Check for update Auf Updates prüfen - + mark_all_read_action Alle als gelesen markieren diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index 2219bacf2..0a1ef8cef 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -672,145 +672,145 @@ App - + remote_provisioning_dialog Voulez-vous télécharger et appliquer la configuration depuis cette adresse ? Do you want to download and apply remote provisioning from this address ? + + - - - - + + info_popup_error_title Error Error - - + + info_popup_configuration_failed_message Remote provisioning failed : %1 Remote provisioning failed : %1 - + info_popup_error_checking_update An error occured while trying to check update. Please try again later or contact support team. An error occured while trying to check update. Please try again later or contact support team. - + info_popup_new_version_download_label Download it ! Download it ! - + info_popup_new_version_available_title New version available ! New version available ! - + info_popup_new_version_available_message A new version of Linphone (%1) is available. %2 A new version of Linphone (%1) is available at %1 - + info_popup_version_up_to_date_title Up to date Up to date - + info_popup_version_up_to_date_message Your version is up to date Up to date Your version is up to date - + configuration_error_detail not reachable not reachable - + application_description "A free and open source SIP video-phone." A free and open source SIP video-phone. - + command_line_arg_order "Send an order to the application towards a command line" Send an order to the application towards a command line - + command_line_option_show_help Show this help - + command_line_option_show_app_version Show app version - + command_line_option_config_to_fetch "Specify the linphone configuration file to be fetched. It will be merged with the current configuration." Specify the linphone configuration file to be fetched. It will be merged with the current configuration. - + command_line_option_config_to_fetch_arg "URL, path or file" URL, path or file - + command_line_option_minimized Minimize - + command_line_option_log_to_stdout Log to stdout some debug information while running - + command_line_option_print_app_logs_only "Print only logs from the application" Print only logs from the application - + hide_action "Cacher" "Afficher" Hide - + show_action Show - + quit_action "Quitter" Quit - + check_for_update Check for update Check for update - + mark_all_read_action Marquer tout comme lu diff --git a/Linphone/data/languages/fr.ts b/Linphone/data/languages/fr.ts index edeb45545..b7983650c 100644 --- a/Linphone/data/languages/fr.ts +++ b/Linphone/data/languages/fr.ts @@ -672,145 +672,145 @@ App - + remote_provisioning_dialog Voulez-vous télécharger et appliquer la configuration depuis cette adresse ? Voulez-vous télécharger et appliquer la configuration depuis cette adresse ? + + - - - - + + info_popup_error_title Error Erreur - - + + info_popup_configuration_failed_message Remote provisioning failed : %1 La configuration distante a échoué : %1 - + info_popup_error_checking_update An error occured while trying to check update. Please try again later or contact support team. Une erreur est survenue lors de la recherche de mise à jour. Merci de réessayer plus tard ou de contacter l'équipe de support. - + info_popup_new_version_download_label Download it ! Téléchargez-là ! - + info_popup_new_version_available_title New version available ! Nouvelle version disponible ! - + info_popup_new_version_available_message A new version of Linphone (%1) is available. %2 Une nouvelle version de Linphone (%1) est disponible. %2 - + info_popup_version_up_to_date_title Up to date À jour - + info_popup_version_up_to_date_message Your version is up to date Votre version est à jour - + configuration_error_detail not reachable indisponible - + application_description "A free and open source SIP video-phone." A free and open source SIP video-phone. - + command_line_arg_order "Send an order to the application towards a command line" Send an order to the application towards a command line - + command_line_option_show_help Show this help - + command_line_option_show_app_version Afficher la version de l'application - + command_line_option_config_to_fetch "Specify the linphone configuration file to be fetched. It will be merged with the current configuration." Specify the linphone configuration file to be fetched. It will be merged with the current configuration. - + command_line_option_config_to_fetch_arg "URL, path or file" URL, path or file - + command_line_option_minimized Minimiser - + command_line_option_log_to_stdout Log to stdout some debug information while running - + command_line_option_print_app_logs_only "Print only logs from the application" Print only logs from the application - + hide_action "Cacher" "Afficher" Cacher - + show_action Afficher - + quit_action "Quitter" Quitter - + check_for_update Check for update Rechercher une mise à jour - + mark_all_read_action Marquer tout comme lu