diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-01-26 01:29:26 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-01-26 22:34:28 +0000 |
commit | ed70a645aac345cfbe46abe69046de8805c9c985 (patch) | |
tree | ee1de53036bacca35a2725695dc1adda385571cf /src | |
parent | d2997b92666f19ab86b9571f54ed9573fa057c30 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/styles/qwindowsvistastyle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp index 083b1d1707..3fa0fc899d 100644 --- a/src/widgets/styles/qwindowsvistastyle.cpp +++ b/src/widgets/styles/qwindowsvistastyle.cpp @@ -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; |