aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/webviewtabbar.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-06-11 16:00:31 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2017-06-11 16:00:31 +0200
commit765f33e796dbc1e8c5fefd77c9cf4cdf58a99a83 (patch)
tree48dfd56b366d96d4bb06b8cda4ba2776622815cc /src/widgets/webviewtabbar.h
parentAdded new profile button (diff)
downloadsmolbote-765f33e796dbc1e8c5fefd77c9cf4cdf58a99a83.tar.xz
Fixed crash when closing last tab
Diffstat (limited to 'src/widgets/webviewtabbar.h')
-rw-r--r--src/widgets/webviewtabbar.h6
1 files changed, 4 insertions, 2 deletions
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<WebView*> m_views;
QSignalMapper *m_signalMapper;
+ QWebEngineProfile *m_profile;
};
#endif // WEBVIEWTABBAR_H