From cdd61111cfc1bf0022f1944fca8aef9c88f8aa38 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Fri, 1 Nov 2024 20:39:31 +0100 Subject: [PATCH] Fusion style: remove unused variables in CE_TabBarTabShape Remove some unused variables in CE_TabBarTabShape - they are not used since the initial Qt4 import. Change-Id: I2ec4ee8ac9bfdde9d40587c50eb6d57bf38419ac Reviewed-by: Axel Spoerl (cherry picked from commit 4c0b45553862d3eff35906d02ea5e2afd9252bbd) Reviewed-by: Volker Hilsheimer --- src/widgets/styles/qfusionstyle.cpp | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index 89e904b5a16..a52f04db4bf 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -1667,15 +1667,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio && tab->position == QStyleOptionTab::Beginning)); bool onlyOne = tab->position == QStyleOptionTab::OnlyOneTab; int tabOverlap = pixelMetric(PM_TabBarTabOverlap, option, widget); - rect = option->rect.adjusted(0, 0, (onlyOne || lastTab) ? 0 : tabOverlap, 0); - - QRect r2(rect); - int x1 = r2.left(); - int x2 = r2.right(); - int y1 = r2.top(); - int y2 = r2.bottom(); - - painter->setPen(d->innerContrastLine()); + QRect rect = option->rect.adjusted(0, 0, (onlyOne || lastTab) ? 0 : tabOverlap, 0); QTransform rotMatrix; bool flip = false; @@ -1708,16 +1700,8 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio return; } - if (flip) { - QRect tmp = rect; - rect = QRect(tmp.y(), tmp.x(), tmp.height(), tmp.width()); - int temp = x1; - x1 = y1; - y1 = temp; - temp = x2; - x2 = y2; - y2 = temp; - } + if (flip) + rect = QRect(rect.y(), rect.x(), rect.height(), rect.width()); painter->setRenderHint(QPainter::Antialiasing, true); painter->translate(0.5, 0.5);