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

[Crash Fix:] closing tabs (deleting WebTabs)

This commit is contained in:
nowrep 2011-03-03 15:54:12 +01:00
parent fc2e9fdb95
commit 86896447cb
3 changed files with 6 additions and 5 deletions

View File

@ -2,7 +2,7 @@
#include "qupzilla.h" #include "qupzilla.h"
#include "webview.h" #include "webview.h"
#include "mainapplication.h" #include "mainapplication.h"
#include "autofillwidget.h" #include "autofillnotification.h"
AutoFillModel::AutoFillModel(QupZilla* mainClass, QObject *parent) : AutoFillModel::AutoFillModel(QupZilla* mainClass, QObject *parent) :
QObject(parent) QObject(parent)

View File

@ -37,6 +37,7 @@ public:
public slots: public slots:
void showUrl(const QUrl &url, bool empty = true); void showUrl(const QUrl &url, bool empty = true);
void checkBookmark();
private slots: private slots:
void siteIconChanged(); void siteIconChanged();
@ -44,7 +45,6 @@ private slots:
void textEdit(); void textEdit();
void showPopup(); void showPopup();
void bookmarkIconClicked(); void bookmarkIconClicked();
void checkBookmark();
void showSiteInfo(); void showSiteInfo();
void rssIconClicked(); void rssIconClicked();

View File

@ -63,10 +63,11 @@ bool WebView::isCurrent()
{ {
if (!tabWidget()) if (!tabWidget())
return false; return false;
if (qobject_cast<WebTab*>(tabWidget()->widget(tabWidget()->currentIndex()))->view() == this) WebTab* webTab = qobject_cast<WebTab*>(tabWidget()->widget(tabWidget()->currentIndex()));
return true; if (!webTab)
return false;
return false; return (webTab->view() == this);
} }
void WebView::urlChanged(const QUrl &url) void WebView::urlChanged(const QUrl &url)