Commit 039ead33 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(app): little fixes for qml profiler

parent 36e43fe3
......@@ -156,12 +156,11 @@ void App::initContentApp () {
// Load splashscreen.
activeSplashScreen(this);
CoreManager *core = CoreManager::getInstance();
if (m_parser.isSet("selftest"))
QObject::connect(core, &CoreManager::linphoneCoreCreated, this, &App::quit);
else
QObject::connect(core, &CoreManager::linphoneCoreCreated, this, &App::openAppAfterInit);
QObject::connect(
CoreManager::getInstance(),
&CoreManager::linphoneCoreCreated,
this, m_parser.isSet("selftest") ? &App::quit : &App::openAppAfterInit
);
QObject::connect(
this, &App::receivedMessage, this, [this](int, QByteArray message) {
......
......@@ -69,13 +69,7 @@ void CoreManager::init (QObject *parent, const QString &config_path) {
QTimer *timer = m_instance->m_cbs_timer = new QTimer(m_instance);
timer->setInterval(20);
QObject::connect(
timer, &QTimer::timeout, m_instance, []() {
m_instance->lockVideoRender();
m_instance->m_core->iterate();
m_instance->unlockVideoRender();
}
);
QObject::connect(timer, &QTimer::timeout, m_instance, &CoreManager::iterate);
}
// -----------------------------------------------------------------------------
......@@ -136,3 +130,11 @@ void CoreManager::createLinphoneCore (const QString &config_path) {
setDatabasesPaths();
setOtherPaths();
}
// -----------------------------------------------------------------------------
void CoreManager::iterate () {
m_instance->lockVideoRender();
m_instance->m_core->iterate();
m_instance->unlockVideoRender();
}
......@@ -116,6 +116,8 @@ private:
void createLinphoneCore (const QString &config_path);
void iterate ();
std::shared_ptr<linphone::Core> m_core;
std::shared_ptr<CoreHandlers> m_handlers;
......
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