mirror of
https://invent.kde.org/network/falkon.git
synced 2024-09-22 02:02:10 +02:00
[Fix] Fixed occasional fails to restore session.
- also removed unneeded (now) checks to process slot while app/window is closing * as now no signals will be invoked on deleted objects
This commit is contained in:
parent
8a88bdcc2d
commit
ee8a16b3e1
|
@ -683,7 +683,8 @@ static const int sessionVersion = 0x0002;
|
|||
|
||||
bool MainApplication::saveStateSlot()
|
||||
{
|
||||
if (m_websettings->testAttribute(QWebSettings::PrivateBrowsingEnabled) || m_isRestoring) {
|
||||
if (m_websettings->testAttribute(QWebSettings::PrivateBrowsingEnabled) ||
|
||||
m_isRestoring || m_mainWindows.count() == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -697,6 +698,7 @@ bool MainApplication::saveStateSlot()
|
|||
|
||||
stream << sessionVersion;
|
||||
stream << m_mainWindows.count();
|
||||
|
||||
for (int i = 0; i < m_mainWindows.count(); i++) {
|
||||
QupZilla* qz = m_mainWindows.at(i).data();
|
||||
if (!qz) {
|
||||
|
|
|
@ -1479,7 +1479,14 @@ void QupZilla::closeEvent(QCloseEvent* event)
|
|||
|
||||
#ifndef Q_WS_MAC
|
||||
if (mApp->windowCount() == 0) {
|
||||
quitApp() ? event->accept() : event->ignore();
|
||||
if (quitApp()) {
|
||||
event->accept();
|
||||
disconnectAllWidgets();
|
||||
}
|
||||
else {
|
||||
event->ignore();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -1537,7 +1544,7 @@ bool QupZilla::quitApp()
|
|||
}
|
||||
}
|
||||
|
||||
mApp->quitApplication();
|
||||
QTimer::singleShot(0, mApp, SLOT(quitApplication()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ void NetworkManager::loadSettings()
|
|||
|
||||
void NetworkManager::setSSLConfiguration(QNetworkReply* reply)
|
||||
{
|
||||
if (!reply->sslConfiguration().isNull() && !mApp->isClosing()) {
|
||||
if (!reply->sslConfiguration().isNull()) {
|
||||
QSslCertificate cert = reply->sslConfiguration().peerCertificate();
|
||||
if (!cert.isValid() || reply->property("downReply").toBool()) {
|
||||
return;
|
||||
|
|
|
@ -222,10 +222,6 @@ void WebView::loadFinished(bool state)
|
|||
{
|
||||
Q_UNUSED(state);
|
||||
|
||||
if (mApp->isClosing() || p_QupZilla->isClosing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (animationLoading(tabIndex(), false)->movie()) {
|
||||
animationLoading(tabIndex(), false)->movie()->stop();
|
||||
}
|
||||
|
@ -324,11 +320,6 @@ void WebView::titleChanged()
|
|||
|
||||
void WebView::iconChanged()
|
||||
{
|
||||
if (mApp->isClosing() || p_QupZilla->isClosing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// if (isCurrent())
|
||||
emit siteIconChanged();
|
||||
|
||||
if (m_isLoading) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user