From 1f6e14830f655e37b4d53ecfabeb2e0ed289a2a7 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Tue, 6 Jun 2017 13:14:00 +0200 Subject: [PATCH] feat(components/core/CoreManager): set user agent --- linphone-desktop/src/components/core/CoreManager.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/linphone-desktop/src/components/core/CoreManager.cpp b/linphone-desktop/src/components/core/CoreManager.cpp index d1c87a3b2..f47c075e4 100644 --- a/linphone-desktop/src/components/core/CoreManager.cpp +++ b/linphone-desktop/src/components/core/CoreManager.cpp @@ -29,6 +29,10 @@ #include "CoreManager.hpp" +#ifndef LINPHONE_QT_GIT_VERSION + #define LINPHONE_QT_GIT_VERSION "unknown" +#endif // ifndef LINPHONE_QT_GIT_VERSION + #define CBS_CALL_INTERVAL 20 using namespace std; @@ -40,8 +44,7 @@ CoreManager *CoreManager::mInstance = nullptr; CoreManager::CoreManager (QObject *parent, const QString &configPath) : QObject(parent), mHandlers(make_shared(this)) { mPromiseBuild = QtConcurrent::run(this, &CoreManager::createLinphoneCore, configPath); - QObject::connect( - &mPromiseWatcher, &QFutureWatcher::finished, this, []() { + QObject::connect(&mPromiseWatcher, &QFutureWatcher::finished, this, []() { mInstance->mCallsListModel = new CallsListModel(mInstance); mInstance->mContactsListModel = new ContactsListModel(mInstance); mInstance->mSipAddressesModel = new SipAddressesModel(mInstance); @@ -52,8 +55,7 @@ CoreManager::CoreManager (QObject *parent, const QString &configPath) : QObject( mInstance->mCbsTimer->start(); emit mInstance->coreCreated(); - } - ); + }); mPromiseWatcher.setFuture(mPromiseBuild); } @@ -134,6 +136,7 @@ void CoreManager::createLinphoneCore (const QString &configPath) { mCore->setVideoDisplayFilter("MSOGL"); mCore->usePreviewWindow(true); + mCore->setUserAgent("Linphone Desktop", LINPHONE_QT_GIT_VERSION); setDatabasesPaths(); setOtherPaths();