mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
parent
09cf53a292
commit
9a99509faf
@ -512,6 +512,11 @@ bool MainApplication::isClosing() const
|
||||
return m_isClosing;
|
||||
}
|
||||
|
||||
bool MainApplication::isRestoring() const
|
||||
{
|
||||
return m_isRestoring;
|
||||
}
|
||||
|
||||
bool MainApplication::isPrivateSession() const
|
||||
{
|
||||
return m_isPrivateSession;
|
||||
|
@ -82,6 +82,7 @@ public:
|
||||
static MainApplication* getInstance() { return static_cast<MainApplication*>(QCoreApplication::instance()); }
|
||||
|
||||
bool isClosing() const;
|
||||
bool isRestoring() const;
|
||||
bool isPrivateSession() const;
|
||||
bool isStartingAfterCrash() const;
|
||||
int windowCount() const;
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "locationbar.h"
|
||||
#include "qztools.h"
|
||||
#include "qzsettings.h"
|
||||
#include "mainapplication.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QWebHistory>
|
||||
@ -111,11 +112,12 @@ TabbedWebView* WebTab::view() const
|
||||
void WebTab::setCurrentTab()
|
||||
{
|
||||
if (!isRestored()) {
|
||||
if (isVisible()) {
|
||||
QTimer::singleShot(0, this, SLOT(slotRestore()));
|
||||
// When session is being restored, restore the tab immediately
|
||||
if (mApp->isRestoring()) {
|
||||
slotRestore();
|
||||
}
|
||||
else {
|
||||
slotRestore();
|
||||
QTimer::singleShot(0, this, SLOT(slotRestore()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user