mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
[BrowserWindow] Make sure window is created with at least one tab
This commit is contained in:
parent
84f117e68e
commit
551ccd6e3c
@ -232,8 +232,8 @@ void BrowserWindow::postLaunch()
|
||||
}
|
||||
}
|
||||
|
||||
if (m_tabWidget->getTabBar()->normalTabsCount() <= 0 && m_windowType != Qz::BW_OtherRestoredWindow) {
|
||||
// Something went really wrong .. add one tab
|
||||
// Something went really wrong .. add one tab
|
||||
if (m_tabWidget->getTabBar()->normalTabsCount() <= 0) {
|
||||
QNetworkRequest request(m_homepage);
|
||||
request.setRawHeader("X-QupZilla-UserLoadAction", QByteArray("1"));
|
||||
|
||||
|
@ -381,11 +381,13 @@ bool MainApplication::restoreSession(BrowserWindow* window, RestoreData restoreD
|
||||
window->restoreWindowState(data);
|
||||
}
|
||||
|
||||
processEvents();
|
||||
|
||||
foreach (const RestoreManager::WindowData &data, restoreData) {
|
||||
BrowserWindow* window = createWindow(Qz::BW_OtherRestoredWindow);
|
||||
window->restoreWindowState(data);
|
||||
// for correct geometry calculation in BrowserWindow::setupUi()
|
||||
mApp->processEvents();
|
||||
|
||||
processEvents();
|
||||
}
|
||||
|
||||
destroyRestoreManager();
|
||||
|
Loading…
Reference in New Issue
Block a user