Remove deprecated bctbx_set_default_encoding

This commit is contained in:
Julien Wadel 2024-07-22 10:55:53 +02:00
parent 4fd3e61709
commit ea583b001a
3 changed files with 94 additions and 88 deletions

View file

@ -8,10 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- Screen Sharing - Screen Sharing
## 5.2.5 - 2024-07-10 ## 5.2.6 - 2024-07-22
### Fixed ### Fixed
- Crash on Windows when using non-UTF8 characters in system username. - Crash on Windows when using non-UTF8 characters in system username.
- Update SDK to 5.3.72
## 5.2.5 - 2024-07-10
### Fixed
- Case sensitive issue with sip attributes on LDAP search. - Case sensitive issue with sip attributes on LDAP search.
- Update SDK to 5.3.68 - Update SDK to 5.3.68

View file

@ -79,7 +79,7 @@ const QString IconsDirectory(QDir::homePath().append(QStringLiteral("/.local/sha
const QString OsascriptExecutable(QStringLiteral("osascript")); const QString OsascriptExecutable(QStringLiteral("osascript"));
#else #else
const QString const QString
AutoStartSettingsFilePath(QStringLiteral("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run")); AutoStartSettingsFilePath(QStringLiteral("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"));
#endif // ifdef Q_OS_LINUX #endif // ifdef Q_OS_LINUX
} // namespace } // namespace
@ -107,7 +107,7 @@ bool App::autoStartEnabled() {
// check if the Exec part of the autostart ini file not corresponding to our executable (old desktop entry with // check if the Exec part of the autostart ini file not corresponding to our executable (old desktop entry with
// wrong version in filename) // wrong version in filename)
if (autoStartConf.indexOf(QString("Exec=" + exec + " ")) < if (autoStartConf.indexOf(QString("Exec=" + exec + " ")) <
0) { // On autostart, there is the option --iconified so there is one space. 0) { // On autostart, there is the option --iconified so there is one space.
// replace file // replace file
setAutoStart(true); setAutoStart(true);
} }
@ -140,11 +140,11 @@ bool App::autoStartEnabled() {
QProcess process; QProcess process;
process.start(OsascriptExecutable, process.start(OsascriptExecutable,
{"-e", "tell application \"System Events\" to get the name of every login item"}); {"-e", "tell application \"System Events\" to get the name of every login item"});
if (!process.waitForFinished()) { if (!process.waitForFinished()) {
qWarning() << QStringLiteral("Unable to execute properly: `%1` (%2).") qWarning() << QStringLiteral("Unable to execute properly: `%1` (%2).")
.arg(OsascriptExecutable) .arg(OsascriptExecutable)
.arg(process.errorString()); .arg(process.errorString());
return false; return false;
} }
@ -187,7 +187,7 @@ static inline string getConfigPathIfExists(const QCommandLineParser &parser) {
string configPath; string configPath;
if (!QUrl(filePath).isRelative()) { if (!QUrl(filePath).isRelative()) {
configPath = Utils::appStringToCoreString(FileDownloader::synchronousDownload( configPath = Utils::appStringToCoreString(FileDownloader::synchronousDownload(
filePath, Utils::coreStringToAppString(Paths::getConfigDirPath(false)), true)); filePath, Utils::coreStringToAppString(Paths::getConfigDirPath(false)), true));
} }
if (configPath == "") configPath = Paths::getConfigFilePath(filePath, false); if (configPath == "") configPath = Paths::getConfigFilePath(filePath, false);
if (configPath == "") configPath = Paths::getConfigFilePath("", false); if (configPath == "") configPath = Paths::getConfigFilePath("", false);
@ -218,7 +218,7 @@ QString App::getFetchConfig(QCommandLineParser *parser) {
createParser(); createParser();
} else if (!filePath.isEmpty()) } else if (!filePath.isEmpty())
mParser->process( mParser->process(
cleanParserKeys(mParser, QStringList("fetch-config"))); // Remove this parameter from the parser cleanParserKeys(mParser, QStringList("fetch-config"))); // Remove this parameter from the parser
return filePath; return filePath;
} }
@ -231,10 +231,10 @@ bool App::useFetchConfig(const QString &filePath) {
} else { } else {
QObject *context = new QObject(); QObject *context = new QObject();
connect(CoreManager::getInstance(), &CoreManager::coreManagerInitialized, context, connect(CoreManager::getInstance(), &CoreManager::coreManagerInitialized, context,
[context, filePath, this]() { [context, filePath, this]() {
useFetchConfig(filePath); useFetchConfig(filePath);
context->deleteLater(); context->deleteLater();
}); });
} }
} }
return false; return false;
@ -264,13 +264,13 @@ bool App::setFetchConfig(QString filePath) {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
App::App(int &argc, char *argv[]) App::App(int &argc, char *argv[])
: SingleApplication(argc, argv, true, Mode::User | Mode::ExcludeAppPath | Mode::ExcludeAppVersion) { : SingleApplication(argc, argv, true, Mode::User | Mode::ExcludeAppPath | Mode::ExcludeAppVersion) {
// Ignore vertical sync. This way, we avoid blinking on resizes(and other refresh steps like layouts etc.). // Ignore vertical sync. This way, we avoid blinking on resizes(and other refresh steps like layouts etc.).
auto ignoreVSync = QSurfaceFormat::defaultFormat(); auto ignoreVSync = QSurfaceFormat::defaultFormat();
ignoreVSync.setSwapInterval(0); ignoreVSync.setSwapInterval(0);
QSurfaceFormat::setDefaultFormat(ignoreVSync); QSurfaceFormat::setDefaultFormat(ignoreVSync);
connect(this, SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, connect(this, SIGNAL(applicationStateChanged(Qt::ApplicationState)), this,
SLOT(stateChanged(Qt::ApplicationState))); SLOT(stateChanged(Qt::ApplicationState)));
setWindowIcon(QIcon(Constants::WindowIconPath)); setWindowIcon(QIcon(Constants::WindowIconPath));
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
@ -303,13 +303,14 @@ App::App(int &argc, char *argv[])
// Use UTF-8 for internals. Linphone uses UTF-8 so there will be no loss on // Use UTF-8 for internals. Linphone uses UTF-8 so there will be no loss on
// data with less precise encodings. Qt will do the rest. // data with less precise encodings. Qt will do the rest.
bctbx_set_default_encoding(Constants::LinphoneLocaleEncoding); // bctbx_set_default_encoding(Constants::LinphoneLocaleEncoding);
setlocale(LC_CTYPE, ".UTF8");
createParser(); createParser();
mParser->parse(this->arguments()); mParser->parse(this->arguments());
// Get configuration for translators // Get configuration for translators
shared_ptr<linphone::Config> config = shared_ptr<linphone::Config> config =
Utils::getConfigIfExists(QString::fromStdString(getConfigPathIfExists(*mParser))); Utils::getConfigIfExists(QString::fromStdString(getConfigPathIfExists(*mParser)));
// Init locale. // Init locale.
mTranslator = new DefaultTranslator(this); mTranslator = new DefaultTranslator(this);
@ -341,18 +342,18 @@ App::App(int &argc, char *argv[])
mAutoStart = autoStartEnabled(); mAutoStart = autoStartEnabled();
qInfo() << QStringLiteral("Starting application " APPLICATION_NAME " (bin: " EXECUTABLE_NAME qInfo() << QStringLiteral("Starting application " APPLICATION_NAME " (bin: " EXECUTABLE_NAME
"). Version:%1 Os:%2 Qt:%3") "). Version:%1 Os:%2 Qt:%3")
.arg(applicationVersion()) .arg(applicationVersion())
.arg(Utils::getOsProduct()) .arg(Utils::getOsProduct())
.arg(qVersion()); .arg(qVersion());
qInfo() << QStringLiteral("Use locale: %1 with language: %2") qInfo() << QStringLiteral("Use locale: %1 with language: %2")
.arg(mLocale.name()) .arg(mLocale.name())
.arg(QLocale::languageToString(mLocale.language())); .arg(QLocale::languageToString(mLocale.language()));
qInfo() << QStringLiteral("System timezone: code=%1 / country=%2 / Offset=%3 / ID=%4") qInfo() << QStringLiteral("System timezone: code=%1 / country=%2 / Offset=%3 / ID=%4")
.arg(QTimeZone::systemTimeZone().country()) .arg(QTimeZone::systemTimeZone().country())
.arg(Utils::getCountryName(QTimeZone::systemTimeZone().country())) .arg(Utils::getCountryName(QTimeZone::systemTimeZone().country()))
.arg(QTimeZone::systemTimeZone().standardTimeOffset(QDateTime::currentDateTime())) .arg(QTimeZone::systemTimeZone().standardTimeOffset(QDateTime::currentDateTime()))
.arg(QString(QTimeZone::systemTimeZoneId())); .arg(QString(QTimeZone::systemTimeZoneId()));
// Deal with received messages and CLI. // Deal with received messages and CLI.
QObject::connect(this, &App::receivedMessage, this, [](int, const QByteArray &byteArray) { QObject::connect(this, &App::receivedMessage, this, [](int, const QByteArray &byteArray) {
@ -566,11 +567,11 @@ void App::initContentApp() {
if (mEngine->rootObjects().isEmpty()) qFatal("Unable to open main window."); if (mEngine->rootObjects().isEmpty()) qFatal("Unable to open main window.");
QObject::connect(CoreManager::getInstance(), &CoreManager::coreManagerInitialized, CoreManager::getInstance(), QObject::connect(CoreManager::getInstance(), &CoreManager::coreManagerInitialized, CoreManager::getInstance(),
[this, mustBeIconified]() mutable { [this, mustBeIconified]() mutable {
if (CoreManager::getInstance()->started()) { if (CoreManager::getInstance()->started()) {
openAppAfterInit(mustBeIconified); openAppAfterInit(mustBeIconified);
} }
}); });
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@ -650,20 +651,20 @@ void App::createParser() {
mParser = new QCommandLineParser(); mParser = new QCommandLineParser();
mParser->setApplicationDescription(tr("applicationDescription")); mParser->setApplicationDescription(tr("applicationDescription"));
mParser->addPositionalArgument("command", tr("commandLineDescription").replace("%1", APPLICATION_NAME), mParser->addPositionalArgument("command", tr("commandLineDescription").replace("%1", APPLICATION_NAME),
"[command]"); "[command]");
mParser->addOptions({ mParser->addOptions({
{{"h", "help"}, tr("commandLineOptionHelp")}, {{"h", "help"}, tr("commandLineOptionHelp")},
{"cli-help", tr("commandLineOptionCliHelp").replace("%1", APPLICATION_NAME)}, {"cli-help", tr("commandLineOptionCliHelp").replace("%1", APPLICATION_NAME)},
{{"v", "version"}, tr("commandLineOptionVersion")}, {{"v", "version"}, tr("commandLineOptionVersion")},
{"config", tr("commandLineOptionConfig").replace("%1", EXECUTABLE_NAME), tr("commandLineOptionConfigArg")}, {"config", tr("commandLineOptionConfig").replace("%1", EXECUTABLE_NAME), tr("commandLineOptionConfigArg")},
{"fetch-config", tr("commandLineOptionFetchConfig").replace("%1", EXECUTABLE_NAME), {"fetch-config", tr("commandLineOptionFetchConfig").replace("%1", EXECUTABLE_NAME),
tr("commandLineOptionFetchConfigArg")}, tr("commandLineOptionFetchConfigArg")},
{{"c", "call"}, tr("commandLineOptionCall").replace("%1", EXECUTABLE_NAME), tr("commandLineOptionCallArg")}, {{"c", "call"}, tr("commandLineOptionCall").replace("%1", EXECUTABLE_NAME), tr("commandLineOptionCallArg")},
#ifndef Q_OS_MACOS #ifndef Q_OS_MACOS
{"iconified", tr("commandLineOptionIconified")}, {"iconified", tr("commandLineOptionIconified")},
#endif // ifndef Q_OS_MACOS #endif // ifndef Q_OS_MACOS
{{"V", "verbose"}, tr("commandLineOptionVerbose")}, {{"V", "verbose"}, tr("commandLineOptionVerbose")},
{"qt-logs-only", tr("commandLineOptionQtLogsOnly")}, {"qt-logs-only", tr("commandLineOptionQtLogsOnly")},
}); });
} }
@ -713,7 +714,7 @@ static inline void registerUncreatableType(const char *name) {
template <typename T> template <typename T>
static inline void registerSingletonType(const char *name) { static inline void registerSingletonType(const char *name) {
qmlRegisterSingletonType<T>(Constants::MainQmlUri, 1, 0, name, qmlRegisterSingletonType<T>(Constants::MainQmlUri, 1, 0, name,
[](QQmlEngine *engine, QJSEngine *) -> QObject * { return new T(engine); }); [](QQmlEngine *engine, QJSEngine *) -> QObject * { return new T(engine); });
} }
template <typename T> template <typename T>
@ -724,7 +725,7 @@ static inline void registerType(const char *name) {
template <typename T> template <typename T>
static inline void registerToolType(const char *name, const int &major_version = 1, const int &minor_version = 0) { static inline void registerToolType(const char *name, const int &major_version = 1, const int &minor_version = 0) {
qmlRegisterSingletonType<T>(name, major_version, minor_version, name, qmlRegisterSingletonType<T>(name, major_version, minor_version, name,
[](QQmlEngine *engine, QJSEngine *) -> QObject * { return new T(engine); }); [](QQmlEngine *engine, QJSEngine *) -> QObject * { return new T(engine); });
} }
template <typename T, typename Owner, T *(Owner::*function)() const> template <typename T, typename Owner, T *(Owner::*function)() const>
@ -835,7 +836,7 @@ void App::registerTypes() {
registerUncreatableType<ParticipantImdnStateListModel>("ParticipantImdnStateListModel"); registerUncreatableType<ParticipantImdnStateListModel>("ParticipantImdnStateListModel");
qmlRegisterUncreatableMetaObject(LinphoneEnums::staticMetaObject, "LinphoneEnums", 1, 0, "LinphoneEnums", qmlRegisterUncreatableMetaObject(LinphoneEnums::staticMetaObject, "LinphoneEnums", 1, 0, "LinphoneEnums",
"Only enums"); "Only enums");
} }
void App::registerSharedTypes() { void App::registerSharedTypes() {
@ -850,7 +851,7 @@ void App::registerSharedTypes() {
registerSharedSingletonType<CallsListModel, &CoreManager::getCallsListModel>("CallsListModel"); registerSharedSingletonType<CallsListModel, &CoreManager::getCallsListModel>("CallsListModel");
registerSharedSingletonType<ContactsListModel, &CoreManager::getContactsListModel>("ContactsListModel"); registerSharedSingletonType<ContactsListModel, &CoreManager::getContactsListModel>("ContactsListModel");
registerSharedSingletonType<ContactsImporterListModel, &CoreManager::getContactsImporterListModel>( registerSharedSingletonType<ContactsImporterListModel, &CoreManager::getContactsImporterListModel>(
"ContactsImporterListModel"); "ContactsImporterListModel");
registerSharedSingletonType<LdapListModel, &CoreManager::getLdapListModel>("LdapListModel"); registerSharedSingletonType<LdapListModel, &CoreManager::getLdapListModel>("LdapListModel");
registerSharedSingletonType<TimelineListModel, &CoreManager::getTimelineListModel>("TimelineListModel"); registerSharedSingletonType<TimelineListModel, &CoreManager::getTimelineListModel>("TimelineListModel");
registerSharedSingletonType<RecorderManager, &CoreManager::getRecorderManager>("RecorderManager"); registerSharedSingletonType<RecorderManager, &CoreManager::getRecorderManager>("RecorderManager");
@ -887,10 +888,10 @@ void App::registerUninstalledModules() {
void App::setTrayIcon() { void App::setTrayIcon() {
QQuickWindow *root = getMainWindow(); QQuickWindow *root = getMainWindow();
QSystemTrayIcon *systemTrayIcon = QSystemTrayIcon *systemTrayIcon =
(mSystemTrayIcon (mSystemTrayIcon
? mSystemTrayIcon ? mSystemTrayIcon
: new QSystemTrayIcon( : new QSystemTrayIcon(
nullptr)); // Workaround : QSystemTrayIcon cannot be deleted because of setContextMenu (indirectly) nullptr)); // Workaround : QSystemTrayIcon cannot be deleted because of setContextMenu (indirectly)
// trayIcon: Right click actions. // trayIcon: Right click actions.
QAction *settingsAction = new QAction(tr("settings"), root); QAction *settingsAction = new QAction(tr("settings"), root);
@ -906,8 +907,8 @@ void App::setTrayIcon() {
root->connect(aboutAction, &QAction::triggered, root, [root] { root->connect(aboutAction, &QAction::triggered, root, [root] {
App::smartShowWindow(root); App::smartShowWindow(root);
QMetaObject::invokeMethod(root, Constants::AttachVirtualWindowMethodName, Qt::DirectConnection, QMetaObject::invokeMethod(root, Constants::AttachVirtualWindowMethodName, Qt::DirectConnection,
Q_ARG(QVariant, QUrl(Constants::AboutPath)), Q_ARG(QVariant, QVariant()), Q_ARG(QVariant, QUrl(Constants::AboutPath)), Q_ARG(QVariant, QVariant()),
Q_ARG(QVariant, QVariant())); Q_ARG(QVariant, QVariant()));
}); });
QAction *restoreAction = new QAction(tr("restore"), root); QAction *restoreAction = new QAction(tr("restore"), root);
@ -918,7 +919,7 @@ void App::setTrayIcon() {
// trayIcon: Left click actions. // trayIcon: Left click actions.
static QMenu *menu = static QMenu *menu =
new QMenu(); // Static : Workaround about a bug with setContextMenu where it cannot be called more than once. new QMenu(); // Static : Workaround about a bug with setContextMenu where it cannot be called more than once.
root->connect(systemTrayIcon, &QSystemTrayIcon::activated, [root](QSystemTrayIcon::ActivationReason reason) { root->connect(systemTrayIcon, &QSystemTrayIcon::activated, [root](QSystemTrayIcon::ActivationReason reason) {
if (reason == QSystemTrayIcon::Trigger) { if (reason == QSystemTrayIcon::Trigger) {
if (root->visibility() == QWindow::Hidden) smartShowWindow(root); if (root->visibility() == QWindow::Hidden) smartShowWindow(root);
@ -936,7 +937,7 @@ void App::setTrayIcon() {
menu->addAction(quitAction); menu->addAction(quitAction);
if (!mSystemTrayIcon) if (!mSystemTrayIcon)
systemTrayIcon->setContextMenu(menu); // This is a Qt bug. We cannot call setContextMenu more than once. So we systemTrayIcon->setContextMenu(menu); // This is a Qt bug. We cannot call setContextMenu more than once. So we
// have to keep an instance of the menu. // have to keep an instance of the menu.
systemTrayIcon->setIcon(QIcon(Constants::WindowIconPath)); systemTrayIcon->setIcon(QIcon(Constants::WindowIconPath));
systemTrayIcon->setToolTip(APPLICATION_NAME); systemTrayIcon->setToolTip(APPLICATION_NAME);
systemTrayIcon->show(); systemTrayIcon->show();
@ -976,8 +977,8 @@ void App::initLocale(const shared_ptr<linphone::Config> &config) {
// QLocale sysLocale = QLocale(qtLocale.join('_')); // QLocale sysLocale = QLocale(qtLocale.join('_'));
// #else // #else
QLocale sysLocale(QLocale::system().name()); // Use Locale from name because Qt has a bug where it didn't use the QLocale sysLocale(QLocale::system().name()); // Use Locale from name because Qt has a bug where it didn't use the
// QLocale::language (aka : translator.language != locale.language) on // QLocale::language (aka : translator.language != locale.language) on
// Mac. #endif // Mac. #endif
if (installLocale(*this, *mTranslator, sysLocale)) { if (installLocale(*this, *mTranslator, sysLocale)) {
mLocale = sysLocale; mLocale = sysLocale;
return; return;
@ -986,12 +987,12 @@ void App::initLocale(const shared_ptr<linphone::Config> &config) {
QString App::getConfigLocale() const { QString App::getConfigLocale() const {
return Utils::coreStringToAppString( return Utils::coreStringToAppString(
CoreManager::getInstance()->getCore()->getConfig()->getString(SettingsModel::UiSection, "locale", "")); CoreManager::getInstance()->getCore()->getConfig()->getString(SettingsModel::UiSection, "locale", ""));
} }
void App::setConfigLocale(const QString &locale) { void App::setConfigLocale(const QString &locale) {
CoreManager::getInstance()->getCore()->getConfig()->setString(SettingsModel::UiSection, "locale", CoreManager::getInstance()->getCore()->getConfig()->setString(SettingsModel::UiSection, "locale",
Utils::appStringToCoreString(locale)); Utils::appStringToCoreString(locale));
emit configLocaleChanged(locale); emit configLocaleChanged(locale);
} }
@ -1091,20 +1092,20 @@ bool App::generateDesktopFile(const QString &confPath, bool remove, bool openInB
} }
QTextStream(&file) QTextStream(&file)
<< QString("[Desktop Entry]\n" << QString("[Desktop Entry]\n"
"Name=" APPLICATION_NAME "\n" "Name=" APPLICATION_NAME "\n"
"GenericName=SIP Phone\n" "GenericName=SIP Phone\n"
"Comment=" APPLICATION_DESCRIPTION "\n" "Comment=" APPLICATION_DESCRIPTION "\n"
"Type=Application\n") "Type=Application\n")
<< (openInBackground ? "Exec=" + exec + " --iconified %u\n" : "Exec=" + exec + " %u\n") << (openInBackground ? "Exec=" + exec + " --iconified %u\n" : "Exec=" + exec + " %u\n")
<< (haveIcon ? "Icon=" + iconPath + "\n" : "Icon=" EXECUTABLE_NAME "\n") << (haveIcon ? "Icon=" + iconPath + "\n" : "Icon=" EXECUTABLE_NAME "\n")
<< "Terminal=false\n" << "Terminal=false\n"
"Categories=Network;Telephony;\n" "Categories=Network;Telephony;\n"
"MimeType=x-scheme-handler/sip-" EXECUTABLE_NAME "MimeType=x-scheme-handler/sip-" EXECUTABLE_NAME
";x-scheme-handler/sip;x-scheme-handler/sips-" EXECUTABLE_NAME ";x-scheme-handler/sip;x-scheme-handler/sips-" EXECUTABLE_NAME
";x-scheme-handler/sips;x-scheme-handler/tel;x-scheme-handler/callto;x-scheme-handler/" EXECUTABLE_NAME ";x-scheme-handler/sips;x-scheme-handler/tel;x-scheme-handler/callto;x-scheme-handler/" EXECUTABLE_NAME
"-config;\n" "-config;\n"
"X-PulseAudio-Properties=media.role=phone\n"; "X-PulseAudio-Properties=media.role=phone\n";
return true; return true;
} }
@ -1121,12 +1122,12 @@ void App::setAutoStart(bool enabled) {
if (enabled) if (enabled)
QProcess::execute(OsascriptExecutable, QProcess::execute(OsascriptExecutable,
{"-e", "tell application \"System Events\" to make login item at end with properties" {"-e", "tell application \"System Events\" to make login item at end with properties"
"{ path: \"" + "{ path: \"" +
getMacOsBundlePath() + "\", hidden: false }"}); getMacOsBundlePath() + "\", hidden: false }"});
else else
QProcess::execute(OsascriptExecutable, {"-e", "tell application \"System Events\" to delete login item \"" + QProcess::execute(OsascriptExecutable, {"-e", "tell application \"System Events\" to delete login item \"" +
getMacOsBundleName() + "\""}); getMacOsBundleName() + "\""});
mAutoStart = enabled; mAutoStart = enabled;
emit autoStartChanged(enabled); emit autoStartChanged(enabled);
@ -1175,7 +1176,7 @@ void App::openAppAfterInit(bool mustBeIconified) {
// Display Assistant if it does not exist proxy config. // Display Assistant if it does not exist proxy config.
if (coreManager->getAccountList().empty()) if (coreManager->getAccountList().empty())
QMetaObject::invokeMethod(mainWindow, "setView", Q_ARG(QVariant, Constants::AssistantViewName), QMetaObject::invokeMethod(mainWindow, "setView", Q_ARG(QVariant, Constants::AssistantViewName),
Q_ARG(QVariant, QString("")), Q_ARG(QVariant, QString(""))); Q_ARG(QVariant, QString("")), Q_ARG(QVariant, QString("")));
#ifdef ENABLE_UPDATE_CHECK #ifdef ENABLE_UPDATE_CHECK
QTimer *timer = new QTimer(mEngine); QTimer *timer = new QTimer(mEngine);
@ -1188,9 +1189,9 @@ void App::openAppAfterInit(bool mustBeIconified) {
#endif // ifdef ENABLE_UPDATE_CHECK #endif // ifdef ENABLE_UPDATE_CHECK
QString fetchFilePath = getFetchConfig(mParser); QString fetchFilePath = getFetchConfig(mParser);
mustBeIconified = mustBeIconified =
mustBeIconified && mustBeIconified &&
(fetchFilePath.isEmpty() || (fetchFilePath.isEmpty() ||
CoreManager::getInstance()->getSettingsModel()->getAutoApplyProvisioningConfigUriHandlerEnabled()); CoreManager::getInstance()->getSettingsModel()->getAutoApplyProvisioningConfigUriHandlerEnabled());
bool showWindow = true; bool showWindow = true;
if (fetchFilePath.isEmpty()) { if (fetchFilePath.isEmpty()) {
QString lastRunningVersion = CoreManager::getInstance()->getSettingsModel()->getLastRunningVersionOfApp(); QString lastRunningVersion = CoreManager::getInstance()->getSettingsModel()->getLastRunningVersionOfApp();
@ -1207,13 +1208,13 @@ void App::openAppAfterInit(bool mustBeIconified) {
} else { } else {
QObject *context = new QObject(); QObject *context = new QObject();
QObject::connect(CoreManager::getInstance(), &CoreManager::coreManagerInitialized, context, QObject::connect(CoreManager::getInstance(), &CoreManager::coreManagerInitialized, context,
[sipAddress, coreManager, context]() mutable { [sipAddress, coreManager, context]() mutable {
if (context) { if (context) {
delete context; delete context;
context = nullptr; context = nullptr;
coreManager->getCallsListModel()->launchAudioCall(sipAddress); coreManager->getCallsListModel()->launchAudioCall(sipAddress);
} }
}); });
} }
} else { } else {
// Execute command argument if needed // Execute command argument if needed

@ -1 +1 @@
Subproject commit 8801d140665d5b5b01d1f825e6952d16170178d4 Subproject commit 865f9ecb1edeae93730c7d7a415812c4b1b7df51