From d08ec28d70934fa82d51efceb1a422d96c6812f6 Mon Sep 17 00:00:00 2001 From: Franz Fellner Date: Wed, 24 Oct 2012 18:24:39 +0200 Subject: [PATCH] remove CloseButton::hideEvent() That causes crashes when entering/leaving fullscreen mode when the tabbar has non-closable tabs. deleteLater() in the hideEvent left a dangling pointer in the corresponding QTabBarPrivate::Tab. The next re-layout of the tabs caused the crash when querying the size of the deleted closeButton: [...] --- src/lib/webview/tabbar.cpp | 9 --------- src/lib/webview/tabbar.h | 1 - 2 files changed, 10 deletions(-) diff --git a/src/lib/webview/tabbar.cpp b/src/lib/webview/tabbar.cpp index 28922e7f9..0f383e59a 100644 --- a/src/lib/webview/tabbar.cpp +++ b/src/lib/webview/tabbar.cpp @@ -647,15 +647,6 @@ void CloseButton::leaveEvent(QEvent* event) QAbstractButton::leaveEvent(event); } -void CloseButton::hideEvent(QHideEvent* event) -{ - QAbstractButton::hideEvent(event); - - if (!isVisible()) { - deleteLater(); - } -} - void CloseButton::paintEvent(QPaintEvent*) { QPainter p(this); diff --git a/src/lib/webview/tabbar.h b/src/lib/webview/tabbar.h index 19bc22aef..48f240535 100644 --- a/src/lib/webview/tabbar.h +++ b/src/lib/webview/tabbar.h @@ -128,7 +128,6 @@ public: void enterEvent(QEvent* event); void leaveEvent(QEvent* event); - void hideEvent(QHideEvent* event); void paintEvent(QPaintEvent* event); };