mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-30 02:19:23 +00:00
feat(src/app/App): update nat policy when settings window is closed
This commit is contained in:
parent
c245d7a866
commit
dfafcb3b65
1 changed files with 10 additions and 0 deletions
|
|
@ -330,6 +330,16 @@ void App::createSubWindows () {
|
|||
|
||||
m_calls_window = createSubWindow(this, QML_VIEW_CALLS_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());
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue