diff --git a/CHANGELOG.md b/CHANGELOG.md index 99508ff67..086de753e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 5.2.2 - 2024-03-07 +## 5.2.2 - 2024-03-08 ### Fixed - Audio latency and bad echo behavior when going to media settings while being in call. @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Empty route can now be set in account settings. - Network remote file can be used in chat attachment on Windows. - Crash on forwarding a message to a new secure chat room. +- URI handlers and remote provisioning. - Update SDK to 5.3.26. ### Added diff --git a/linphone-app/src/app/App.cpp b/linphone-app/src/app/App.cpp index 569e1c0fe..d796478ec 100644 --- a/linphone-app/src/app/App.cpp +++ b/linphone-app/src/app/App.cpp @@ -226,10 +226,18 @@ QString App::getFetchConfig (QCommandLineParser *parser) { void App::useFetchConfig(const QString& filePath){ if( !filePath.isEmpty()){ - if(CoreManager::getInstance()->getSettingsModel()->getAutoApplyProvisioningConfigUriHandlerEnabled()) - setFetchConfig(filePath); - else - emit requestFetchConfig(filePath); + if(CoreManager::getInstance()->isInitialized()) { + if(CoreManager::getInstance()->getSettingsModel()->getAutoApplyProvisioningConfigUriHandlerEnabled()) + setFetchConfig(filePath); + else + emit requestFetchConfig(filePath); + }else{ + QObject * context = new QObject(); + connect(CoreManager::getInstance(), &CoreManager::coreManagerInitialized, context, [context, filePath, this](){ + useFetchConfig(filePath); + context->deleteLater(); + }); + } } } @@ -549,14 +557,20 @@ void App::initContentApp () { } } ); - - // Execute command argument if needed. - const QString commandArgument = getCommandArgument(); - if (!commandArgument.isEmpty()) { - Cli::CommandFormat format; - Cli::executeCommand(commandArgument, &format); - if (format == Cli::UriFormat || format == Cli::UrlFormat ) - mustBeIconified = true; + + // Execute command argument if needed + // Commands are executed only once. clearPsitionalArguments doesn't work as its name suggest : getPositionalArguments still retrieve user arguments. + // So execute the command only once. + static bool firstRun = false; + if(!firstRun){ + firstRun = true; + const QString commandArgument = getCommandArgument(); + if (!commandArgument.isEmpty()) { + Cli::CommandFormat format; + Cli::executeCommand(commandArgument, &format); + if (format == Cli::UriFormat || format == Cli::UrlFormat ) + mustBeIconified = true; + } } } diff --git a/linphone-app/src/app/cli/Cli.cpp b/linphone-app/src/app/cli/Cli.cpp index 2b3bc7247..39e977a71 100644 --- a/linphone-app/src/app/cli/Cli.cpp +++ b/linphone-app/src/app/cli/Cli.cpp @@ -524,9 +524,7 @@ void Cli::executeCommand (const QString &command, CommandFormat *format) { App::getInstance()->useFetchConfig(fetchUrl); }else{ shared_ptr address; - QString qAddress; - std::string t; - address = linphone::Factory::get()->createAddress(Utils::appStringToCoreString(transformedCommand));// Test if command is an address + QString qAddress = transformedCommand; if(Utils::isUsername(transformedCommand)){ address = linphone::Factory::get()->createAddress(Utils::appStringToCoreString(transformedCommand+"@to.remove")); address->setDomain(""); diff --git a/linphone-app/src/components/core/CoreManager.hpp b/linphone-app/src/components/core/CoreManager.hpp index a4703b940..d53116494 100644 --- a/linphone-app/src/components/core/CoreManager.hpp +++ b/linphone-app/src/components/core/CoreManager.hpp @@ -118,7 +118,6 @@ public: } SettingsModel *getSettingsModel () const { - Q_CHECK_PTR(mSettingsModel); return mSettingsModel; } EmojisSettingsModel *getEmojisSettingsModel () const {