mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
Fixed crash + updated html highlighter
Fixed crash when closing main window while there are still tabs loading and there are more than one QupZilla window
This commit is contained in:
parent
0a92482d3a
commit
490f88ffc2
@ -86,6 +86,7 @@ QupZilla::QupZilla(bool tryRestore, QUrl startUrl)
|
|||||||
, m_tryRestore(tryRestore)
|
, m_tryRestore(tryRestore)
|
||||||
, m_historyMenuChanged(true)
|
, m_historyMenuChanged(true)
|
||||||
, m_bookmarksMenuChanged(true)
|
, m_bookmarksMenuChanged(true)
|
||||||
|
, m_isClosing(false)
|
||||||
, m_startingUrl(startUrl)
|
, m_startingUrl(startUrl)
|
||||||
, m_actionPrivateBrowsing(0)
|
, m_actionPrivateBrowsing(0)
|
||||||
, m_webInspectorDock(0)
|
, m_webInspectorDock(0)
|
||||||
@ -1094,6 +1095,7 @@ void QupZilla::closeEvent(QCloseEvent* event)
|
|||||||
if (mApp->isClosing())
|
if (mApp->isClosing())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
m_isClosing = true;
|
||||||
mApp->saveStateSlot();
|
mApp->saveStateSlot();
|
||||||
mApp->aboutToCloseWindow(this);
|
mApp->aboutToCloseWindow(this);
|
||||||
|
|
||||||
|
@ -106,6 +106,8 @@ public:
|
|||||||
inline QAction* actionRestoreTab() { return m_actionRestoreTab; }
|
inline QAction* actionRestoreTab() { return m_actionRestoreTab; }
|
||||||
inline QMenu* superMenu() { return m_superMenu; }
|
inline QMenu* superMenu() { return m_superMenu; }
|
||||||
|
|
||||||
|
inline bool isClosing() { return m_isClosing; }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void loadHistory();
|
void loadHistory();
|
||||||
void startingCompleted();
|
void startingCompleted();
|
||||||
@ -196,6 +198,7 @@ private:
|
|||||||
bool m_tryRestore;
|
bool m_tryRestore;
|
||||||
bool m_historyMenuChanged;
|
bool m_historyMenuChanged;
|
||||||
bool m_bookmarksMenuChanged;
|
bool m_bookmarksMenuChanged;
|
||||||
|
bool m_isClosing;
|
||||||
QUrl m_startingUrl;
|
QUrl m_startingUrl;
|
||||||
QUrl m_newtab;
|
QUrl m_newtab;
|
||||||
QUrl m_homepage;
|
QUrl m_homepage;
|
||||||
|
@ -176,6 +176,7 @@ void AutoFillModel::post(const QNetworkRequest &request, const QByteArray &outgo
|
|||||||
|
|
||||||
QString passwordName = "";
|
QString passwordName = "";
|
||||||
QString passwordValue = "";
|
QString passwordValue = "";
|
||||||
|
QUrl siteUrl = webView->url();
|
||||||
|
|
||||||
QWebElementCollection inputs;
|
QWebElementCollection inputs;
|
||||||
QList<QWebFrame*> frames;
|
QList<QWebFrame*> frames;
|
||||||
@ -194,13 +195,13 @@ void AutoFillModel::post(const QNetworkRequest &request, const QByteArray &outgo
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Return if storing is not enabled, data for this page is already stored, no password element found in sent data
|
//Return if storing is not enabled, data for this page is already stored, no password element found in sent data
|
||||||
if (passwordName.isEmpty() || !isStoringEnabled(request.url()) || isStored(request.url()))
|
if (passwordName.isEmpty() || !isStoringEnabled(siteUrl) || isStored(siteUrl))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//Return if no password form has been sent
|
//Return if no password form has been sent
|
||||||
if (!outgoingData.contains((QUrl(passwordName).toEncoded() + "=")) || passwordValue.isEmpty())
|
if (!outgoingData.contains((QUrl(passwordName).toEncoded() + "=")) || passwordValue.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
AutoFillNotification* aWidget = new AutoFillNotification(webView->url(), outgoingData, passwordValue);
|
AutoFillNotification* aWidget = new AutoFillNotification(siteUrl, outgoingData, passwordValue);
|
||||||
webView->addNotification(aWidget);
|
webView->addNotification(aWidget);
|
||||||
}
|
}
|
||||||
|
@ -221,7 +221,7 @@ void NavigationBar::goAtHistoryIndex()
|
|||||||
|
|
||||||
void NavigationBar::refreshHistory()
|
void NavigationBar::refreshHistory()
|
||||||
{
|
{
|
||||||
if (mApp->isClosing())
|
if (mApp->isClosing() || p_QupZilla->isClosing())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QWebHistory* history = p_QupZilla->weView()->page()->history();
|
QWebHistory* history = p_QupZilla->weView()->page()->history();
|
||||||
|
@ -117,7 +117,7 @@
|
|||||||
<< "allowscriptaccess=\"" << "cols=\"" << "rows=\""
|
<< "allowscriptaccess=\"" << "cols=\"" << "rows=\""
|
||||||
<< "profile=\"" << "colspan=\"" << "scope=\""
|
<< "profile=\"" << "colspan=\"" << "scope=\""
|
||||||
<< "data=\"" << "autoplay=\"" << "hspace=\""
|
<< "data=\"" << "autoplay=\"" << "hspace=\""
|
||||||
<< "valign=\"" << "vspace=\""
|
<< "valign=\"" << "vspace=\"" << "controls=\""
|
||||||
<< "href=\"" << "title=\"" << "xmlns=\"";
|
<< "href=\"" << "title=\"" << "xmlns=\"";
|
||||||
foreach (const QString &pattern, optionsPatterns) {
|
foreach (const QString &pattern, optionsPatterns) {
|
||||||
rule.pattern = QRegExp(pattern);
|
rule.pattern = QRegExp(pattern);
|
||||||
|
@ -248,7 +248,7 @@ void WebView::loadFinished(bool state)
|
|||||||
{
|
{
|
||||||
Q_UNUSED(state);
|
Q_UNUSED(state);
|
||||||
|
|
||||||
if (mApp->isClosing())
|
if (mApp->isClosing() || p_QupZilla->isClosing())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (animationLoading(tabIndex(), false)->movie())
|
if (animationLoading(tabIndex(), false)->movie())
|
||||||
@ -296,7 +296,7 @@ void WebView::titleChanged()
|
|||||||
|
|
||||||
void WebView::iconChanged()
|
void WebView::iconChanged()
|
||||||
{
|
{
|
||||||
if (mApp->isClosing())
|
if (mApp->isClosing() || p_QupZilla->isClosing())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// if (isCurrent())
|
// if (isCurrent())
|
||||||
|
Loading…
Reference in New Issue
Block a user