Commit 1f6e1483 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(components/core/CoreManager): set user agent

parent 1db3c9c0
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
#include "CoreManager.hpp" #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 #define CBS_CALL_INTERVAL 20
using namespace std; using namespace std;
...@@ -40,8 +44,7 @@ CoreManager *CoreManager::mInstance = nullptr; ...@@ -40,8 +44,7 @@ CoreManager *CoreManager::mInstance = nullptr;
CoreManager::CoreManager (QObject *parent, const QString &configPath) : QObject(parent), mHandlers(make_shared<CoreHandlers>(this)) { CoreManager::CoreManager (QObject *parent, const QString &configPath) : QObject(parent), mHandlers(make_shared<CoreHandlers>(this)) {
mPromiseBuild = QtConcurrent::run(this, &CoreManager::createLinphoneCore, configPath); mPromiseBuild = QtConcurrent::run(this, &CoreManager::createLinphoneCore, configPath);
QObject::connect( QObject::connect(&mPromiseWatcher, &QFutureWatcher<void>::finished, this, []() {
&mPromiseWatcher, &QFutureWatcher<void>::finished, this, []() {
mInstance->mCallsListModel = new CallsListModel(mInstance); mInstance->mCallsListModel = new CallsListModel(mInstance);
mInstance->mContactsListModel = new ContactsListModel(mInstance); mInstance->mContactsListModel = new ContactsListModel(mInstance);
mInstance->mSipAddressesModel = new SipAddressesModel(mInstance); mInstance->mSipAddressesModel = new SipAddressesModel(mInstance);
...@@ -52,8 +55,7 @@ CoreManager::CoreManager (QObject *parent, const QString &configPath) : QObject( ...@@ -52,8 +55,7 @@ CoreManager::CoreManager (QObject *parent, const QString &configPath) : QObject(
mInstance->mCbsTimer->start(); mInstance->mCbsTimer->start();
emit mInstance->coreCreated(); emit mInstance->coreCreated();
} });
);
mPromiseWatcher.setFuture(mPromiseBuild); mPromiseWatcher.setFuture(mPromiseBuild);
} }
...@@ -134,6 +136,7 @@ void CoreManager::createLinphoneCore (const QString &configPath) { ...@@ -134,6 +136,7 @@ void CoreManager::createLinphoneCore (const QString &configPath) {
mCore->setVideoDisplayFilter("MSOGL"); mCore->setVideoDisplayFilter("MSOGL");
mCore->usePreviewWindow(true); mCore->usePreviewWindow(true);
mCore->setUserAgent("Linphone Desktop", LINPHONE_QT_GIT_VERSION);
setDatabasesPaths(); setDatabasesPaths();
setOtherPaths(); setOtherPaths();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment