diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index e04e81c789..be6507f1ed 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -2910,7 +2910,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt, opt, widget).actualSize(QSize(iconSize, iconSize)); sz += QSize(buttonMargin, buttonMargin); if (verticalTitleBar) - sz.transpose(); + sz = sz.transposed(); closeRect = QRect(right - sz.width(), rect.center().y() - sz.height()/2, sz.width(), sz.height()); @@ -2927,7 +2927,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt, opt, widget).actualSize(QSize(iconSize, iconSize)); sz += QSize(buttonMargin, buttonMargin); if (verticalTitleBar) - sz.transpose(); + sz = sz.transposed(); floatRect = QRect(right - sz.width(), rect.center().y() - sz.height()/2, sz.width(), sz.height()); @@ -2947,7 +2947,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt, && icon.cacheKey() != QApplication::windowIcon().cacheKey()) { QSize sz = icon.actualSize(QSize(r.height(), r.height())); if (verticalTitleBar) - sz.transpose(); + sz = sz.transposed(); iconRect = QRect(left, rect.center().y() - sz.height()/2, sz.width(), sz.height()); left = iconRect.right() + margin; diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index c586cbb0d2..40a2ca7f14 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -5207,7 +5207,7 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt, opt, widget).actualSize(QSize(iconSize, iconSize)); sz += QSize(buttonMargin, buttonMargin); if (verticalTitleBar) - sz.transpose(); + sz = sz.transposed(); closeRect = QRect(left, srect.center().y() - sz.height()/2, sz.width(), sz.height()); @@ -5224,7 +5224,7 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt, opt, widget).actualSize(QSize(iconSize, iconSize)); sz += QSize(buttonMargin, buttonMargin); if (verticalTitleBar) - sz.transpose(); + sz = sz.transposed(); floatRect = QRect(left, srect.center().y() - sz.height()/2, sz.width(), sz.height()); @@ -5244,7 +5244,7 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt, && icon.cacheKey() != QApplication::windowIcon().cacheKey()) { QSize sz = icon.actualSize(QSize(rect.height(), rect.height())); if (verticalTitleBar) - sz.transpose(); + sz = sz.transposed(); iconRect = QRect(right - sz.width(), srect.center().y() - sz.height()/2, sz.width(), sz.height()); right = iconRect.left() - 1; @@ -6625,7 +6625,7 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, ThemeTabDirection ttd = getTabDirection(tab->shape); bool vertTabs = ttd == kThemeTabWest || ttd == kThemeTabEast; if (vertTabs) - sz.transpose(); + sz = sz.transposed(); int defaultTabHeight; int defaultExtraSpace = proxy()->pixelMetric(PM_TabBarTabHSpace, tab, widget); // Remove spurious gcc warning (AFAIK) QFontMetrics fm = opt->fontMetrics; @@ -6655,7 +6655,7 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, } if (vertTabs) - sz.transpose(); + sz = sz.transposed(); int maxWidgetHeight = qMax(tab->leftButtonSize.height(), tab->rightButtonSize.height()); int maxWidgetWidth = qMax(tab->leftButtonSize.width(), tab->rightButtonSize.width()); diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp index 9e8e0aee27..75fef35968 100644 --- a/src/widgets/widgets/qmainwindowlayout.cpp +++ b/src/widgets/widgets/qmainwindowlayout.cpp @@ -1261,8 +1261,8 @@ bool QMainWindowTabBar::event(QEvent *e) QSize size = this->size(); QSize hint = sizeHint(); if (shape() == QTabBar::RoundedWest || shape() == QTabBar::RoundedEast) { - size.transpose(); - hint.transpose(); + size = size.transposed(); + hint = hint.transposed(); } if (size.width() < hint.width()) return QTabBar::event(e); diff --git a/src/widgets/widgets/qprogressbar.cpp b/src/widgets/widgets/qprogressbar.cpp index 1c76bd0ac1..89d2243299 100644 --- a/src/widgets/widgets/qprogressbar.cpp +++ b/src/widgets/widgets/qprogressbar.cpp @@ -426,7 +426,7 @@ QSize QProgressBar::sizeHint() const int cw = style()->pixelMetric(QStyle::PM_ProgressBarChunkWidth, &opt, this); QSize size = QSize(qMax(9, cw) * 7 + fm.width(QLatin1Char('0')) * 4, fm.height() + 8); if (opt.orientation == Qt::Vertical) - size.transpose(); + size = size.transposed(); return style()->sizeFromContents(QStyle::CT_ProgressBar, &opt, size, this); }