diff options
author | Timothy Pearson <[email protected]> | 2012-11-14 23:45:27 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-11-14 23:45:27 -0600 |
commit | 5e04c37a6ce7a090adb9e6ea02a04761dea8a33e (patch) | |
tree | b361ace08a667135125ac6bf00c82452b61c23d5 /src/styles/qwindowsstyle.cpp | |
parent | 30c5994817cb87f4a291eec0bc6eaec485eefb15 (diff) | |
download | qt3-5e04c37a6ce7a090adb9e6ea02a04761dea8a33e.tar.gz qt3-5e04c37a6ce7a090adb9e6ea02a04761dea8a33e.zip |
Increase style method call speed
This breaks the style ABI
Diffstat (limited to 'src/styles/qwindowsstyle.cpp')
-rw-r--r-- | src/styles/qwindowsstyle.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/styles/qwindowsstyle.cpp b/src/styles/qwindowsstyle.cpp index f93e31a..4920f61 100644 --- a/src/styles/qwindowsstyle.cpp +++ b/src/styles/qwindowsstyle.cpp @@ -95,7 +95,7 @@ class QWindowsStyle::Private : public QObject public: Private(QWindowsStyle *parent); - bool objectEventHandler( QStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, QEvent *e ); + bool objectEventHandler( const QStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, QEvent *e ); private: int menuBarTimer; @@ -107,7 +107,7 @@ QWindowsStyle::Private::Private(QWindowsStyle *parent) } // Records Alt- and Focus events -bool QWindowsStyle::Private::objectEventHandler( QStyleControlElementData ceData, ControlElementFlags, void* source, QEvent *e ) +bool QWindowsStyle::Private::objectEventHandler( const QStyleControlElementData &ceData, ControlElementFlags, void* source, QEvent *e ) { if (!(ceData.widgetObjectTypes.contains("QWidget"))) { return TRUE; @@ -173,7 +173,7 @@ QWindowsStyle::~QWindowsStyle() } /*! \reimp */ -bool QWindowsStyle::objectEventHandler( QStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, QEvent *e ) { +bool QWindowsStyle::objectEventHandler( const QStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, QEvent *e ) { if (d) { return d->objectEventHandler(ceData, elementFlags, source, e); } @@ -181,7 +181,7 @@ bool QWindowsStyle::objectEventHandler( QStyleControlElementData ceData, Control } /*! \reimp */ -void QWindowsStyle::applicationPolish(QStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr) +void QWindowsStyle::applicationPolish(const QStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) { // We only need the overhead when shortcuts are sometimes hidden if (styleHint(SH_UnderlineAccelerator, QStyleControlElementData(), CEF_None, 0) && styleHint(SH_HideUnderlineAcceleratorWhenAltUp, QStyleControlElementData(), CEF_None, 0)) { @@ -191,20 +191,20 @@ void QWindowsStyle::applicationPolish(QStyleControlElementData ceData, ControlEl } /*! \reimp */ -void QWindowsStyle::applicationUnPolish(QStyleControlElementData, ControlElementFlags, void *) +void QWindowsStyle::applicationUnPolish(const QStyleControlElementData&, ControlElementFlags, void *) { delete d; d = 0; } /*! \reimp */ -void QWindowsStyle::polish(QStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr) +void QWindowsStyle::polish(const QStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) { QCommonStyle::polish(ceData, elementFlags, ptr); } /*! \reimp */ -void QWindowsStyle::unPolish(QStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr) +void QWindowsStyle::unPolish(const QStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) { QCommonStyle::polish(ceData, elementFlags, ptr); } @@ -218,7 +218,7 @@ void QWindowsStyle::polish( QPalette &pal ) /*! \reimp */ void QWindowsStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QRect &r, const QColorGroup &cg, @@ -688,7 +688,7 @@ void QWindowsStyle::drawPrimitive( PrimitiveElement pe, */ void QWindowsStyle::drawControl( ControlElement element, QPainter *p, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QRect &r, const QColorGroup &cg, @@ -1019,7 +1019,7 @@ void QWindowsStyle::drawControl( ControlElement element, /*! \reimp */ -int QWindowsStyle::pixelMetric(PixelMetric metric, QStyleControlElementData ceData, ControlElementFlags elementFlags, const QWidget *widget) const +int QWindowsStyle::pixelMetric(PixelMetric metric, const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QWidget *widget) const { int ret; @@ -1096,7 +1096,7 @@ int QWindowsStyle::pixelMetric(PixelMetric metric, QStyleControlElementData ceDa \reimp */ QSize QWindowsStyle::sizeFromContents( ContentsType contents, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QSize &contentsSize, const QStyleOption& opt, @@ -1196,7 +1196,7 @@ QSize QWindowsStyle::sizeFromContents( ContentsType contents, /*! \reimp */ -void QWindowsStyle::polishPopupMenu( QStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ) +void QWindowsStyle::polishPopupMenu( const QStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { #ifndef QT_NO_POPUPMENU if ( !(ceData.windowState & WState_Polished ) ) { @@ -1488,7 +1488,7 @@ static const char *const question_xpm[] = { \reimp */ QPixmap QWindowsStyle::stylePixmap(StylePixmap stylepixmap, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QStyleOption& opt, const QWidget *widget) const @@ -1527,7 +1527,7 @@ QPixmap QWindowsStyle::stylePixmap(StylePixmap stylepixmap, /*!\reimp */ void QWindowsStyle::drawComplexControl( ComplexControl ctrl, QPainter *p, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QRect &r, const QColorGroup &cg, @@ -1975,7 +1975,7 @@ void QWindowsStyle::drawComplexControl( ComplexControl ctrl, QPainter *p, /*! \reimp */ int QWindowsStyle::styleHint( StyleHint hint, - QStyleControlElementData ceData, + const QStyleControlElementData &ceData, ControlElementFlags elementFlags, const QStyleOption &opt, QStyleHintReturn *returnData, @@ -2032,7 +2032,7 @@ int QWindowsStyle::styleHint( StyleHint hint, } /*! \reimp */ -QRect QWindowsStyle::subRect(SubRect r, const QStyleControlElementData ceData, const ControlElementFlags elementFlags, const QWidget *widget) const +QRect QWindowsStyle::subRect(SubRect r, const QStyleControlElementData &ceData, const ControlElementFlags elementFlags, const QWidget *widget) const { QRect rect; |