Commit dfafcb3b authored by Ronan Abhamon's avatar Ronan Abhamon

feat(src/app/App): update nat policy when settings window is closed

parent c245d7a8
...@@ -330,6 +330,16 @@ void App::createSubWindows () { ...@@ -330,6 +330,16 @@ void App::createSubWindows () {
m_calls_window = createSubWindow(this, QML_VIEW_CALLS_WINDOW); m_calls_window = createSubWindow(this, QML_VIEW_CALLS_WINDOW);
m_settings_window = createSubWindow(this, QML_VIEW_SETTINGS_WINDOW); m_settings_window = createSubWindow(this, QML_VIEW_SETTINGS_WINDOW);
QObject::connect(
m_settings_window, &QWindow::visibilityChanged, this, [](QWindow::Visibility visibility) {
if (visibility == QWindow::Hidden) {
qInfo() << "Update nat policy.";
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
core->setNatPolicy(core->getNatPolicy());
}
}
);
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
......
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