QWindowsVistaStyle: Reorder the if statement so the variable is checked first
Since the likelyhood that decoration_size is greater than 0 then we can save time with explicitly ensuring that it does not call the functions. Change-Id: Iaf991a6c77bbc4908c459307ca7e645cf3b3ca20 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
parent
d2997b9266
commit
ed70a645aa
@ -398,7 +398,7 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
|
||||
{
|
||||
XPThemeData theme(widget, painter, QWindowsXPStylePrivate::TreeViewTheme);
|
||||
static int decoration_size = 0;
|
||||
if (d->initTreeViewTheming() && theme.isValid() && !decoration_size) {
|
||||
if (!decoration_size && d->initTreeViewTheming() && theme.isValid()) {
|
||||
XPThemeData themeSize = theme;
|
||||
themeSize.partId = TVP_HOTGLYPH;
|
||||
themeSize.stateId = GLPS_OPENED;
|
||||
|
Loading…
Reference in New Issue
Block a user