diff options
Diffstat (limited to 'src/styles/qcommonstyle.cpp')
-rw-r--r-- | src/styles/qcommonstyle.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/styles/qcommonstyle.cpp b/src/styles/qcommonstyle.cpp index b49bef2..a44ee9f 100644 --- a/src/styles/qcommonstyle.cpp +++ b/src/styles/qcommonstyle.cpp @@ -258,6 +258,7 @@ QStyleControlElementData populateControlElementDataFromWidget(const QWidget* wid QStyleControlElementData ceData; if (widget) { + ceData.isNull = false; ceData.widgetObjectTypes = getObjectTypeListForObject(widget); ceData.allDataPopulated = populateReliantFields & populateMinimumNumberOfFields; if (!populateMinimumNumberOfFields) { @@ -695,7 +696,7 @@ QStyleControlElementData populateControlElementDataFromApplication(const QApplic /*! \reimp */ void QCommonStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QRect &r, const QColorGroup &cg, @@ -1173,7 +1174,7 @@ void qt_style_erase_region(QPainter* p, const QRegion& region, QStyleControlElem /*! \reimp */ void QCommonStyle::drawControl( ControlElement element, QPainter *p, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QRect &r, const QColorGroup &cg, @@ -1619,7 +1620,7 @@ void QCommonStyle::drawControl( ControlElement element, { QRect rect = r; - QIconSet* icon = &ceData.iconSet; + const QIconSet* icon = &ceData.iconSet; if ( icon ) { QPixmap pixmap = icon->pixmap( QIconSet::Small, flags & Style_Enabled ? @@ -1653,7 +1654,7 @@ void QCommonStyle::drawControl( ControlElement element, /*! \reimp */ void QCommonStyle::drawControlMask( ControlElement control, QPainter *p, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QRect &r, const QStyleOption& opt, @@ -1689,7 +1690,7 @@ void QCommonStyle::drawControlMask( ControlElement control, } /*! \reimp */ -QRect QCommonStyle::subRect(SubRect r, const QStyleControlElementData ceData, const ControlElementFlags elementFlags, const QWidget *widget) const +QRect QCommonStyle::subRect(SubRect r, const QStyleControlElementData &ceData, const ControlElementFlags elementFlags, const QWidget *widget) const { QRect rect, wrect(ceData.rect); @@ -1985,7 +1986,7 @@ QRect QCommonStyle::subRect(SubRect r, const QStyleControlElementData ceData, co /* I really need this and I don't want to expose it in QRangeControl.. */ -static int qPositionFromValue( QStyleControlElementData ceData, int logical_val, +static int qPositionFromValue( const QStyleControlElementData &ceData, int logical_val, int span ) { if ( span <= 0 || logical_val < ceData.minSteps || @@ -2018,7 +2019,7 @@ static int qPositionFromValue( QStyleControlElementData ceData, int logical_val, /*! \reimp */ void QCommonStyle::drawComplexControl( ComplexControl control, QPainter *p, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QRect &r, const QColorGroup &cg, @@ -2420,7 +2421,7 @@ void QCommonStyle::drawComplexControl( ComplexControl control, /*! \reimp */ void QCommonStyle::drawComplexControlMask( ComplexControl control, QPainter *p, - const QStyleControlElementData ceData, + const QStyleControlElementData &ceData, const ControlElementFlags elementFlags, const QRect &r, const QStyleOption& opt, @@ -2437,7 +2438,7 @@ void QCommonStyle::drawComplexControlMask( ComplexControl control, /*! \reimp */ QRect QCommonStyle::querySubControlMetrics( ComplexControl control, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, SubControl sc, const QStyleOption &opt, @@ -2671,7 +2672,7 @@ QRect QCommonStyle::querySubControlMetrics( ComplexControl control, /*! \reimp */ QStyle::SubControl QCommonStyle::querySubControl(ComplexControl control, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QPoint &pos, const QStyleOption& opt, @@ -2746,7 +2747,7 @@ QStyle::SubControl QCommonStyle::querySubControl(ComplexControl control, } /*! \reimp */ -int QCommonStyle::pixelMetric(PixelMetric m, QStyleControlElementData ceData, ControlElementFlags elementFlags, const QWidget *widget) const +int QCommonStyle::pixelMetric(PixelMetric m, const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QWidget *widget) const { int ret; @@ -2970,7 +2971,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, QStyleControlElementData ceData, Co /*! \reimp */ QSize QCommonStyle::sizeFromContents(ContentsType contents, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QSize &contentsSize, const QStyleOption& opt, @@ -3140,7 +3141,7 @@ QSize QCommonStyle::sizeFromContents(ContentsType contents, } /*! \reimp */ -int QCommonStyle::styleHint(StyleHint sh, QStyleControlElementData ceData, ControlElementFlags elementFlags, const QStyleOption &, QStyleHintReturn *, const QWidget * w) const +int QCommonStyle::styleHint(StyleHint sh, const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QStyleOption &, QStyleHintReturn *, const QWidget * w) const { Q_UNUSED(w); @@ -3223,7 +3224,7 @@ int QCommonStyle::styleHint(StyleHint sh, QStyleControlElementData ceData, Contr } /*! \reimp */ -QPixmap QCommonStyle::stylePixmap(StylePixmap, QStyleControlElementData, ControlElementFlags, const QStyleOption&, const QWidget *) const +QPixmap QCommonStyle::stylePixmap(StylePixmap, const QStyleControlElementData&, ControlElementFlags, const QStyleOption&, const QWidget *) const { return QPixmap(); } |