mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-21 03:06:34 +01:00
[Fix] Fixed crash in QWebInspector when using QtWebKit 2.2
- somehow it is no longer safe to delete QWebInspector ...
This commit is contained in:
parent
5f7d64537a
commit
d1c80b826c
@ -36,7 +36,9 @@ WebInspectorDockWidget::WebInspectorDockWidget(QupZilla* mainClass)
|
|||||||
|
|
||||||
void WebInspectorDockWidget::close()
|
void WebInspectorDockWidget::close()
|
||||||
{
|
{
|
||||||
|
#if (QTWEBKIT_VERSION < QTWEBKIT_VERSION_CHECK(2, 2, 0))
|
||||||
delete m_inspector.data();
|
delete m_inspector.data();
|
||||||
|
#endif
|
||||||
p_QupZilla->weView()->webTab()->setInspectorVisible(false);
|
p_QupZilla->weView()->webTab()->setInspectorVisible(false);
|
||||||
|
|
||||||
hide();
|
hide();
|
||||||
|
@ -50,6 +50,41 @@ WebTab::WebTab(QupZilla* mainClass, LocationBar* locationBar)
|
|||||||
connect(m_locationBar.data(), SIGNAL(loadUrl(QUrl)), m_view.data(), SLOT(load(QUrl)));
|
connect(m_locationBar.data(), SIGNAL(loadUrl(QUrl)), m_view.data(), SLOT(load(QUrl)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WebView* WebTab::view()
|
||||||
|
{
|
||||||
|
return m_view.data();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WebTab::isPinned()
|
||||||
|
{
|
||||||
|
return m_pinned;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebTab::setPinned(bool state)
|
||||||
|
{
|
||||||
|
m_pinned = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebTab::setLocationBar(LocationBar* bar)
|
||||||
|
{
|
||||||
|
m_locationBar = bar;
|
||||||
|
}
|
||||||
|
|
||||||
|
LocationBar* WebTab::locationBar()
|
||||||
|
{
|
||||||
|
return m_locationBar.data();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WebTab::inspectorVisible()
|
||||||
|
{
|
||||||
|
return m_inspectorVisible;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebTab::setInspectorVisible(bool v)
|
||||||
|
{
|
||||||
|
m_inspectorVisible = v;
|
||||||
|
}
|
||||||
|
|
||||||
void WebTab::showNotification(QWidget* notif)
|
void WebTab::showNotification(QWidget* notif)
|
||||||
{
|
{
|
||||||
if (m_layout->count() > 1) {
|
if (m_layout->count() > 1) {
|
||||||
|
@ -32,16 +32,16 @@ class WebTab : public QWidget
|
|||||||
public:
|
public:
|
||||||
explicit WebTab(QupZilla* mainClass, LocationBar* locationBar);
|
explicit WebTab(QupZilla* mainClass, LocationBar* locationBar);
|
||||||
~WebTab();
|
~WebTab();
|
||||||
WebView* view() { return m_view.data(); }
|
WebView* view();
|
||||||
bool isPinned() { return m_pinned; }
|
bool isPinned();
|
||||||
void pinTab(int index);
|
void pinTab(int index);
|
||||||
void setPinned(bool state) { m_pinned = state; }
|
void setPinned(bool state);
|
||||||
|
|
||||||
void setLocationBar(LocationBar* bar) { m_locationBar = bar; }
|
void setLocationBar(LocationBar* bar);
|
||||||
LocationBar* locationBar() { return m_locationBar.data(); }
|
LocationBar* locationBar();
|
||||||
|
|
||||||
bool inspectorVisible() { return m_inspectorVisible; }
|
bool inspectorVisible();
|
||||||
void setInspectorVisible(bool v) { m_inspectorVisible = v; }
|
void setInspectorVisible(bool v);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void showNotification(QWidget* notif);
|
void showNotification(QWidget* notif);
|
||||||
|
Loading…
Reference in New Issue
Block a user