diff --git a/src/kwin4.cpp b/src/kwin4.cpp index b4d58384..1d5a02ab 100644 --- a/src/kwin4.cpp +++ b/src/kwin4.cpp @@ -209,12 +209,12 @@ KWin4App::~KWin4App() } -// Called by KMainWindow when the last window of the application is -bool KWin4App::queryExit() +// Called by Qt when the window is closed +void KWin4App::closeEvent(QCloseEvent *event) { endGame(); saveProperties(); - return true; + KXmlGuiWindow::closeEvent(event); } diff --git a/src/kwin4.h b/src/kwin4.h index af0a2e5e..8e54a7d1 100644 --- a/src/kwin4.h +++ b/src/kwin4.h @@ -123,12 +123,9 @@ class KWin4App : public KXmlGuiWindow */ virtual void readProperties(const KConfigGroup& grp); - /** Called by KMainWindow when the last window of the application is - * going to be closed. - * @see KMainWindow#queryExit - * @see KMainWindow#closeEvent + /** Called by Qt when closing the window */ - virtual bool queryExit(); + void closeEvent(QCloseEvent *event); /** Retrieve the theme file from the theme index number give. * @param idx The theme index number [0..]