Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

Commit

Permalink
Fix saving window state when closing app with Ctrl+Q shortcut
Browse files Browse the repository at this point in the history
Closes #2444
  • Loading branch information
nowrep committed Dec 3, 2017
1 parent 69953fa commit 0cd15ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/app/browserwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,7 @@ void BrowserWindow::keyReleaseEvent(QKeyEvent* event)
void BrowserWindow::closeEvent(QCloseEvent* event)
{
if (mApp->isClosing()) {
saveSettings();
return;
}

Expand Down
4 changes: 4 additions & 0 deletions src/lib/app/mainapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,10 @@ void MainApplication::quitApplication()

m_isClosing = true;

for (BrowserWindow *window : qAsConst(m_windows)) {
window->close();
}

// Saving settings in saveSettings() slot called from quit() so
// everything gets saved also when quitting application in other
// way than clicking Quit action in File menu or closing last window
Expand Down

0 comments on commit 0cd15ad

Please sign in to comment.