mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
BrowserWindow: Don't restore first app window from postLaunch slot
Instead restore it immediately after creation from MainApplication as all other window types.
This commit is contained in:
parent
6b08e17dcd
commit
1de32182c1
|
@ -282,8 +282,8 @@ void BrowserWindow::postLaunch()
|
|||
QWebEngineSettings::defaultSettings()->setAttribute(QWebEngineSettings::JavascriptEnabled, true);
|
||||
m_tabWidget->addView(QUrl("falkon:restore"), Qz::NT_CleanSelectedTabAtTheEnd);
|
||||
}
|
||||
else if ((mApp->afterLaunch() == MainApplication::SelectSession || mApp->afterLaunch() == MainApplication::RestoreSession) && mApp->restoreManager()) {
|
||||
addTab = !mApp->restoreSession(this, mApp->restoreManager()->restoreData());
|
||||
else if (mApp->afterLaunch() == MainApplication::SelectSession || mApp->afterLaunch() == MainApplication::RestoreSession) {
|
||||
addTab = m_tabWidget->count() <= 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -322,7 +322,7 @@ void BrowserWindow::postLaunch()
|
|||
}
|
||||
|
||||
// Something went really wrong .. add one tab
|
||||
if (m_tabWidget->tabBar()->normalTabsCount() <= 0) {
|
||||
if (m_tabWidget->count() <= 0) {
|
||||
m_tabWidget->addView(m_homepage, Qz::NT_SelectedTabAtTheEnd);
|
||||
}
|
||||
|
||||
|
|
|
@ -308,7 +308,6 @@ MainApplication::MainApplication(int &argc, char** argv)
|
|||
|
||||
connect(this, SIGNAL(focusChanged(QWidget*,QWidget*)), this, SLOT(onFocusChanged()));
|
||||
|
||||
|
||||
if (!isPrivate()) {
|
||||
#ifndef DISABLE_CHECK_UPDATES
|
||||
Settings settings;
|
||||
|
@ -323,7 +322,9 @@ MainApplication::MainApplication(int &argc, char** argv)
|
|||
|
||||
if (m_isStartingAfterCrash || afterLaunch() == RestoreSession) {
|
||||
m_restoreManager = new RestoreManager(sessionManager()->lastActiveSessionPath());
|
||||
if (!m_restoreManager->isValid()) {
|
||||
if (m_restoreManager->isValid()) {
|
||||
restoreSession(window, m_restoreManager->restoreData());
|
||||
} else {
|
||||
destroyRestoreManager();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user