mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Fix crash when starting new session after crash
BUG: 408701 FIXED-IN: 23.08.4 Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
parent
5ab952e68f
commit
36b13e452d
@ -74,7 +74,18 @@ QJsonArray RecoveryJsObject::restoreData() const
|
|||||||
|
|
||||||
void RecoveryJsObject::startNewSession()
|
void RecoveryJsObject::startNewSession()
|
||||||
{
|
{
|
||||||
closeTab();
|
auto *view = qobject_cast<TabbedWebView*>(m_page->view());
|
||||||
|
if (!view) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (view->browserWindow()->tabCount() > 1) {
|
||||||
|
view->closeView();
|
||||||
|
} else {
|
||||||
|
auto *oldWindow = view->browserWindow();
|
||||||
|
mApp->createWindow(Qz::BW_NewWindow);
|
||||||
|
oldWindow->close();
|
||||||
|
}
|
||||||
|
|
||||||
mApp->restoreManager()->clearRestoreData();
|
mApp->restoreManager()->clearRestoreData();
|
||||||
mApp->destroyRestoreManager();
|
mApp->destroyRestoreManager();
|
||||||
|
Loading…
Reference in New Issue
Block a user