mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
MainApplication: Completely remove isRestoring state
Restoring session should not be any different from simply opening regular session.
This commit is contained in:
parent
f2002892aa
commit
c85d33e92a
@ -83,7 +83,6 @@ MainApplication::MainApplication(int &argc, char** argv)
|
||||
, m_isPrivate(false)
|
||||
, m_isPortable(false)
|
||||
, m_isClosing(false)
|
||||
, m_isRestoring(false)
|
||||
, m_isStartingAfterCrash(false)
|
||||
, m_history(0)
|
||||
, m_bookmarks(0)
|
||||
@ -355,11 +354,6 @@ bool MainApplication::isClosing() const
|
||||
return m_isClosing;
|
||||
}
|
||||
|
||||
bool MainApplication::isRestoring() const
|
||||
{
|
||||
return m_isRestoring;
|
||||
}
|
||||
|
||||
bool MainApplication::isPrivate() const
|
||||
{
|
||||
return m_isPrivate;
|
||||
@ -423,9 +417,6 @@ void MainApplication::openSession(BrowserWindow* window, RestoreData &restoreDat
|
||||
if (!window)
|
||||
window = createWindow(Qz::BW_OtherRestoredWindow);
|
||||
|
||||
if (m_isRestoring)
|
||||
window->tabWidget()->closeRecoveryTab();
|
||||
|
||||
if (window->tabWidget()->count() != 0) {
|
||||
// This can only happen when recovering crashed session!
|
||||
// Don't restore tabs in current window as user already opened some new tabs.
|
||||
@ -444,17 +435,15 @@ void MainApplication::openSession(BrowserWindow* window, RestoreData &restoreDat
|
||||
|
||||
bool MainApplication::restoreSession(BrowserWindow* window, RestoreData restoreData)
|
||||
{
|
||||
if (m_isPrivate || !restoreData.isValid()) {
|
||||
if (!window || m_isPrivate || !restoreData.isValid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
m_isRestoring = true;
|
||||
|
||||
window->tabWidget()->closeRecoveryTab();
|
||||
openSession(window, restoreData);
|
||||
|
||||
m_restoreManager->clearRestoreData();
|
||||
destroyRestoreManager();
|
||||
m_isRestoring = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -70,7 +70,6 @@ public:
|
||||
~MainApplication();
|
||||
|
||||
bool isClosing() const;
|
||||
bool isRestoring() const;
|
||||
bool isPrivate() const;
|
||||
bool isPortable() const;
|
||||
bool isStartingAfterCrash() const;
|
||||
@ -165,7 +164,6 @@ private:
|
||||
bool m_isPrivate;
|
||||
bool m_isPortable;
|
||||
bool m_isClosing;
|
||||
bool m_isRestoring;
|
||||
bool m_isStartingAfterCrash;
|
||||
|
||||
History* m_history;
|
||||
|
@ -377,7 +377,7 @@ void SessionManager::openSessionManagerDialog()
|
||||
|
||||
void SessionManager::autoSaveLastSession()
|
||||
{
|
||||
if (mApp->isPrivate() || mApp->isRestoring() || mApp->windowCount() == 0) {
|
||||
if (mApp->isPrivate() || mApp->windowCount() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -481,12 +481,7 @@ void WebTab::tabActivated()
|
||||
return;
|
||||
}
|
||||
|
||||
// When session is being restored, restore the tab immediately
|
||||
if (mApp->isRestoring()) {
|
||||
slotRestore();
|
||||
} else {
|
||||
QTimer::singleShot(0, this, SLOT(slotRestore()));
|
||||
}
|
||||
QTimer::singleShot(0, this, SLOT(slotRestore()));
|
||||
}
|
||||
|
||||
void WebTab::resizeEvent(QResizeEvent *event)
|
||||
|
Loading…
Reference in New Issue
Block a user