diff options
author | Timothy Pearson <[email protected]> | 2013-12-22 03:17:30 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-12-22 03:17:30 -0600 |
commit | d1b6b7be7d5bc7754a143b424295a267bbdafdbd (patch) | |
tree | 20ee69ce981cd5ba62c65bb35b21188cd7b83246 /src/widgets/qprogressbar.cpp | |
parent | f4193c940cdc34284e19cf4cb0687c1a8e81a458 (diff) | |
download | qt3-d1b6b7be7d5bc7754a143b424295a267bbdafdbd.tar.gz qt3-d1b6b7be7d5bc7754a143b424295a267bbdafdbd.zip |
Repair performance regression accidentally introduced with new style API
Diffstat (limited to 'src/widgets/qprogressbar.cpp')
-rw-r--r-- | src/widgets/qprogressbar.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/widgets/qprogressbar.cpp b/src/widgets/qprogressbar.cpp index d5011da..99dedb0 100644 --- a/src/widgets/qprogressbar.cpp +++ b/src/widgets/qprogressbar.cpp @@ -429,8 +429,10 @@ void QProgressBar::drawContents( QPainter *p ) QWMatrix oldMatrix = buffer.painter()->worldMatrix(); - QStyleControlElementData ceData = populateControlElementDataFromWidget(this, QStyleOption()); - QStyle::ControlElementFlags elementFlags = getControlElementFlagsForObject(this, ceData.widgetObjectTypes, QStyleOption()); + const QStyleControlElementData &ceData = populateControlElementDataFromWidget(this, QStyleOption()); + QStyle::ControlElementFlags elementFlags = getControlElementFlagsForObject(this, QStyleOption()); + + QRect ceDataRectOrig = ceData.rect; // Draw contents if (m_orientation == Qt::Vertical) { @@ -447,7 +449,7 @@ void QProgressBar::drawContents( QPainter *p ) buffer.painter()->setWorldMatrix(m, TRUE); - ceData.rect = QRect(ceData.rect.y(), ceData.rect.x(), ceData.rect.height(), ceData.rect.width()); + const_cast<QStyleControlElementData&>(ceData).rect = QRect(ceData.rect.y(), ceData.rect.x(), ceData.rect.height(), ceData.rect.width()); } style().drawControl(QStyle::CE_ProgressBarContents, buffer.painter(), ceData, elementFlags, @@ -461,6 +463,8 @@ void QProgressBar::drawContents( QPainter *p ) QStyle::visualRect(style().subRect(QStyle::SR_ProgressBarLabel, this), this ), colorGroup(), flags); } + + const_cast<QStyleControlElementData&>(ceData).rect = ceDataRectOrig; } #endif |