From bd0e1913f0e75149e1978e9949cce7858b817830 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 12 Nov 2020 14:12:29 +0100 Subject: Remove usage of Qt4CompatiblePainting Matching qtbase Change-Id: I1bd569995197158727ed5dff5b86e041c7af2177 Reviewed-by: Alexandru Croitor --- src/imports/nativestyle/qstyle/qquickcommonstyle.cpp | 9 --------- src/imports/nativestyle/qstyle/windows/qquickwindowsstyle.cpp | 3 --- 2 files changed, 12 deletions(-) (limited to 'src') diff --git a/src/imports/nativestyle/qstyle/qquickcommonstyle.cpp b/src/imports/nativestyle/qstyle/qquickcommonstyle.cpp index d3ad39fc..02d58bf4 100644 --- a/src/imports/nativestyle/qstyle/qquickcommonstyle.cpp +++ b/src/imports/nativestyle/qstyle/qquickcommonstyle.cpp @@ -150,10 +150,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q if (opt->state & (State_Sunken | State_On)) { ir.adjust(2, 2, -2, -2); p->setBrush(opt->palette.windowText()); - bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting); - p->setRenderHint(QPainter::Qt4CompatiblePainting); p->drawEllipse(ir); - p->setRenderHint(QPainter::Qt4CompatiblePainting, oldQt4CompatiblePainting); } break; } case PE_FrameFocusRect: @@ -482,7 +479,6 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q p->translate(sx + bsx, sy + bsy); p->setPen(opt->palette.buttonText().color()); p->setBrush(opt->palette.buttonText()); - p->setRenderHint(QPainter::Qt4CompatiblePainting); if (pe == PE_IndicatorSpinDown) { const QPoint points[] = { QPoint(0, 1), QPoint(sw-1, 1), QPoint(sh-2, sh-1) }; p->drawPolygon(points, sizeof points / sizeof *points); @@ -689,7 +685,6 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q imagePainter.translate(sx + bsx, sy + bsy); imagePainter.setPen(opt->palette.buttonText().color()); imagePainter.setBrush(opt->palette.buttonText()); - imagePainter.setRenderHint(QPainter::Qt4CompatiblePainting); if (!(opt->state & State_Enabled)) { imagePainter.translate(1, 1); @@ -1595,8 +1590,6 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, case CE_ToolBoxTabShape: if (const QStyleOptionToolBox *tb = qstyleoption_cast(opt)) { p->setPen(tb->palette.mid().color().darker(150)); - bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting); - p->setRenderHint(QPainter::Qt4CompatiblePainting); int d = 20 + tb->rect.height() - 3; if (tb->direction != Qt::RightToLeft) { const QPoint points[] = { @@ -1621,7 +1614,6 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, }; p->drawPolygon(points, sizeof points / sizeof *points); } - p->setRenderHint(QPainter::Qt4CompatiblePainting, oldQt4CompatiblePainting); p->setPen(tb->palette.light().color()); if (tb->direction != Qt::RightToLeft) { p->drawLine(0, 2, tb->rect.width() - d, 2); @@ -3448,7 +3440,6 @@ void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCompl p->setPen(Qt::NoPen); p->setBrush(pal.button()); - p->setRenderHint(QPainter::Qt4CompatiblePainting); p->drawPolygon(arrow.cbegin(), arrow.size()); a = QStyleHelper::angle(QPointF(width / 2, height / 2), arrow[0]); diff --git a/src/imports/nativestyle/qstyle/windows/qquickwindowsstyle.cpp b/src/imports/nativestyle/qstyle/windows/qquickwindowsstyle.cpp index 45b2c79f..ea062a2e 100644 --- a/src/imports/nativestyle/qstyle/windows/qquickwindowsstyle.cpp +++ b/src/imports/nativestyle/qstyle/windows/qquickwindowsstyle.cpp @@ -2016,10 +2016,8 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp } QBrush oldBrush = p->brush(); - bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting); p->setPen(Qt::NoPen); p->setBrush(handleBrush); - p->setRenderHint(QPainter::Qt4CompatiblePainting); Qt::BGMode oldMode = p->backgroundMode(); p->setBackgroundMode(Qt::OpaqueMode); p->drawRect(x1, y1, x2-x1+1, y2-y1+1); @@ -2102,7 +2100,6 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp p->drawLine(x2, y2-1, x2+d, y2-1-d); break; } - p->setRenderHint(QPainter::Qt4CompatiblePainting, oldQt4CompatiblePainting); } } break; -- cgit v1.2.3