From bc146c8899ceffa3b9caa6201da87ad40bbc83ef Mon Sep 17 00:00:00 2001 From: doitux Date: Mon, 14 May 2007 13:01:16 +0000 Subject: [PATCH] closeevent fix --- src/gui/qt/mainwindow/mainwindowimpl.cpp | 9 +++++++++ src/gui/qt/mainwindow/mainwindowimpl.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp index 3bc598ad..cb0f10ca 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp @@ -2425,3 +2425,12 @@ void mainWindowImpl::blinkingStartButtonAnimationAction() { } pushButton_break->setPalette(tempPalette); } + +void mainWindowImpl::closeEvent(QCloseEvent *event) { + + mySession->terminateNetworkClient(); + if (myServerGuiInterface.get()) myServerGuiInterface->getSession().terminateNetworkServer(); + + event->accept(); + +} \ No newline at end of file diff --git a/src/gui/qt/mainwindow/mainwindowimpl.h b/src/gui/qt/mainwindow/mainwindowimpl.h index 3e72fc65..44227c5a 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.h +++ b/src/gui/qt/mainwindow/mainwindowimpl.h @@ -199,6 +199,8 @@ public slots: void networkError(int, int); void networkStart(int, int, int, int); + void closeEvent(QCloseEvent*); + private: boost::shared_ptr myServerGuiInterface;