From 97d32a11915d36762143ea33147194adac83b127 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Tue, 15 Apr 2014 09:58:12 +0200 Subject: [PATCH] [Mac] Drawing QTabBar without actual object crashes on Mac [ci skip] --- src/lib/tabwidget/combotabbar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/tabwidget/combotabbar.cpp b/src/lib/tabwidget/combotabbar.cpp index 8ab804c75..b30b0cc1b 100644 --- a/src/lib/tabwidget/combotabbar.cpp +++ b/src/lib/tabwidget/combotabbar.cpp @@ -636,6 +636,7 @@ void ComboTabBar::paintEvent(QPaintEvent* ev) { QWidget::paintEvent(ev); +#ifndef Q_OS_MAC // Draw tabbar base even on parts of ComboTabBar that are not directly QTabBar QPainter p(this); QStyleOptionTabBarBaseV2 opt; @@ -664,6 +665,7 @@ void ComboTabBar::paintEvent(QPaintEvent* ev) opt.rect.setWidth(scrollButtonWidth); style()->drawPrimitive(QStyle::PE_FrameTabBarBase, &opt, &p); } +#endif } int ComboTabBar::comboTabBarPixelMetric(ComboTabBar::SizeType sizeType) const