1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

[Mac] Drawing QTabBar without actual object crashes on Mac

[ci skip]
This commit is contained in:
David Rosca 2014-04-15 09:58:12 +02:00
parent b4a5754a40
commit 97d32a1191

View File

@ -636,6 +636,7 @@ void ComboTabBar::paintEvent(QPaintEvent* ev)
{ {
QWidget::paintEvent(ev); QWidget::paintEvent(ev);
#ifndef Q_OS_MAC
// Draw tabbar base even on parts of ComboTabBar that are not directly QTabBar // Draw tabbar base even on parts of ComboTabBar that are not directly QTabBar
QPainter p(this); QPainter p(this);
QStyleOptionTabBarBaseV2 opt; QStyleOptionTabBarBaseV2 opt;
@ -664,6 +665,7 @@ void ComboTabBar::paintEvent(QPaintEvent* ev)
opt.rect.setWidth(scrollButtonWidth); opt.rect.setWidth(scrollButtonWidth);
style()->drawPrimitive(QStyle::PE_FrameTabBarBase, &opt, &p); style()->drawPrimitive(QStyle::PE_FrameTabBarBase, &opt, &p);
} }
#endif
} }
int ComboTabBar::comboTabBarPixelMetric(ComboTabBar::SizeType sizeType) const int ComboTabBar::comboTabBarPixelMetric(ComboTabBar::SizeType sizeType) const