1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-22 02:02:10 +02:00

[BrowserWindow] Make sure window is created with at least one tab

This commit is contained in:
nowrep 2014-04-01 16:34:08 +02:00
parent 84f117e68e
commit 551ccd6e3c
2 changed files with 6 additions and 4 deletions

View File

@ -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); QNetworkRequest request(m_homepage);
request.setRawHeader("X-QupZilla-UserLoadAction", QByteArray("1")); request.setRawHeader("X-QupZilla-UserLoadAction", QByteArray("1"));

View File

@ -381,11 +381,13 @@ bool MainApplication::restoreSession(BrowserWindow* window, RestoreData restoreD
window->restoreWindowState(data); window->restoreWindowState(data);
} }
processEvents();
foreach (const RestoreManager::WindowData &data, restoreData) { foreach (const RestoreManager::WindowData &data, restoreData) {
BrowserWindow* window = createWindow(Qz::BW_OtherRestoredWindow); BrowserWindow* window = createWindow(Qz::BW_OtherRestoredWindow);
window->restoreWindowState(data); window->restoreWindowState(data);
// for correct geometry calculation in BrowserWindow::setupUi()
mApp->processEvents(); processEvents();
} }
destroyRestoreManager(); destroyRestoreManager();