Skip to content

Commit

Permalink
Port from deprecated queryExit to closeEvent, for saving settings on …
Browse files Browse the repository at this point in the history
…close
  • Loading branch information
dfaure committed Apr 27, 2014
1 parent c598010 commit c76ff95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/kwin4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down
7 changes: 2 additions & 5 deletions src/kwin4.h
Original file line number Diff line number Diff line change
Expand Up @@ -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..]
Expand Down

0 comments on commit c76ff95

Please sign in to comment.