diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-08-07 13:08:29 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-08-07 13:08:29 -0500 |
commit | 93b3efa8902c19e9b67114652dc84c463f8c219a (patch) | |
tree | aa0f907f2c1c2f2dd6da5b8ca9c09f41c56be11b /examples/themes/metal.cpp | |
parent | 71a6d7870f609df603d9520a8d292055ea5928c3 (diff) | |
download | qt3-93b3efa8902c19e9b67114652dc84c463f8c219a.tar.gz qt3-93b3efa8902c19e9b67114652dc84c463f8c219a.zip |
Refresh control element data structures before executing style object event handlers
This resolves Bug 1816
Fix FTBFS in style examples
Diffstat (limited to 'examples/themes/metal.cpp')
-rw-r--r-- | examples/themes/metal.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/themes/metal.cpp b/examples/themes/metal.cpp index 636e562..4a8bac8 100644 --- a/examples/themes/metal.cpp +++ b/examples/themes/metal.cpp @@ -41,7 +41,7 @@ MetalStyle::MetalStyle() : QWindowsStyle() { } /*! Reimplementation from QStyle */ -void MetalStyle::applicationPolish( QStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ) +void MetalStyle::applicationPolish( const QStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { oldPalette = ceData.palette; @@ -99,7 +99,7 @@ void MetalStyle::applicationPolish( QStyleControlElementData ceData, ControlElem /*! Reimplementation from QStyle */ -void MetalStyle::applicationUnPolish( QStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ) +void MetalStyle::applicationUnPolish( const QStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, QStyleApplicationActionRequestData(oldPalette, TRUE)); applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, QStyleApplicationActionRequestData(ceData.font, TRUE)); @@ -108,7 +108,7 @@ void MetalStyle::applicationUnPolish( QStyleControlElementData ceData, ControlEl /*! Reimplementation from QStyle */ -void MetalStyle::polish( QStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ) +void MetalStyle::polish( const QStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { // the polish function sets some widgets to transparent mode and // some to translate background mode in order to get the full @@ -126,7 +126,7 @@ void MetalStyle::polish( QStyleControlElementData ceData, ControlElementFlags el } } -void MetalStyle::unPolish( QStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ) +void MetalStyle::unPolish( const QStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { // the polish function sets some widgets to transparent mode and // some to translate background mode in order to get the full @@ -145,7 +145,7 @@ void MetalStyle::unPolish( QStyleControlElementData ceData, ControlElementFlags void MetalStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QRect &r, const QColorGroup &cg, @@ -191,7 +191,7 @@ void MetalStyle::drawPrimitive( PrimitiveElement pe, void MetalStyle::drawControl( ControlElement element, QPainter *p, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QRect &r, const QColorGroup &cg, @@ -292,7 +292,7 @@ void MetalStyle::drawControl( ControlElement element, } void MetalStyle::drawComplexControl( ComplexControl cc, QPainter *p, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QRect &r, const QColorGroup &cg, @@ -468,7 +468,7 @@ void MetalStyle::drawMetalGradient( QPainter *p, int x, int y, int w, int h, -int MetalStyle::pixelMetric( PixelMetric metric, QStyleControlElementData ceData, ControlElementFlags elementFlags, const QWidget *w ) const +int MetalStyle::pixelMetric( PixelMetric metric, const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QWidget *w ) const { switch ( metric ) { case PM_MenuBarFrameWidth: |