1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

BrowserWindow: Add aboutToClose signal

This commit is contained in:
David Rosca 2018-02-02 17:57:24 +01:00
parent 05bb94adfe
commit ae4d971d1a
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
3 changed files with 7 additions and 0 deletions

View File

@ -1508,6 +1508,8 @@ void BrowserWindow::closeEvent(QCloseEvent* event)
} }
} }
emit aboutToClose();
saveSettings(); saveSettings();
mApp->closedWindowsManager()->saveWindow(this); mApp->closedWindowsManager()->saveWindow(this);

View File

@ -125,6 +125,7 @@ public:
signals: signals:
void startingCompleted(); void startingCompleted();
void aboutToClose();
public slots: public slots:
void goHome(); void goHome();

View File

@ -690,6 +690,10 @@ void MainApplication::quitApplication()
return; return;
} }
for (BrowserWindow *window : qAsConst(m_windows)) {
emit window->aboutToClose();
}
if (m_sessionManager && m_windows.count() > 0) { if (m_sessionManager && m_windows.count() > 0) {
m_sessionManager->autoSaveLastSession(); m_sessionManager->autoSaveLastSession();
} }