From 765f33e796dbc1e8c5fefd77c9cf4cdf58a99a83 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 11 Jun 2017 16:00:31 +0200 Subject: Fixed crash when closing last tab --- src/widgets/webviewtabbar.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/widgets/webviewtabbar.h') diff --git a/src/widgets/webviewtabbar.h b/src/widgets/webviewtabbar.h index bf39efe..d1ccf81 100644 --- a/src/widgets/webviewtabbar.h +++ b/src/widgets/webviewtabbar.h @@ -30,7 +30,7 @@ class WebViewTabBar : public QTabBar Q_OBJECT public: - explicit WebViewTabBar(QWidget *parent = 0); + explicit WebViewTabBar(QWebEngineProfile *profile, QWidget *parent = 0); ~WebViewTabBar(); void setProfile(QWebEngineProfile *profile); @@ -42,12 +42,13 @@ signals: void currentTabChanged(WebView *view); public slots: - int addTab(QWebEngineProfile *profile, const QUrl &url); + int addTab(const QUrl &url); void removeTab(int index); void webAction(int action); protected: + void contextMenuEvent(QContextMenuEvent *event); QSize tabSizeHint(int index) const; private slots: @@ -61,6 +62,7 @@ private: QVector m_views; QSignalMapper *m_signalMapper; + QWebEngineProfile *m_profile; }; #endif // WEBVIEWTABBAR_H -- cgit v1.2.1