Handle _yate_windowclosedaction property and trigger the action when a window is closed by the user.

git-svn-id: http://yate.null.ro/svn/yate/trunk@3181 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2010-04-12 10:57:39 +00:00
parent f84384d169
commit 50485efc8b
1 changed files with 6 additions and 0 deletions

View File

@ -1781,6 +1781,12 @@ void QtWindow::closeEvent(QCloseEvent* event)
// NOTE: Don't access window's data after calling hide():
// some logics might destroy the window when hidden
// Notify window closed
String tmp;
if (Client::self() &&
QtClient::getProperty(wndWidget(),"_yate_windowclosedaction",tmp))
Client::self()->action(this,tmp);
// Hide the window when requested
String hideWnd;
if (QtClient::getProperty(wndWidget(),"dynamicHideOnClose",hideWnd) &&