Skip to content

Commit

Permalink
Minor optimization to QWidgetPrivate::setFont_helper()
Browse files Browse the repository at this point in the history
There is no sense in comparing fonts with different resolve_mask-s.

Change-Id: Icfdaf494fce8a59b7138d96fdf7354cc0514ca6a
Reviewed-by: Friedemann Kleint <[email protected]>
  • Loading branch information
KonstantinRitt committed May 1, 2015
1 parent 7443b3c commit af217e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/kernel/qwidget_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class Q_WIDGETS_EXPORT QWidgetPrivate : public QObjectPrivate

void updateFont(const QFont &);
inline void setFont_helper(const QFont &font) {
if (data.fnt == font && data.fnt.resolve() == font.resolve())
if (data.fnt.resolve() == font.resolve() && data.fnt == font)
return;
updateFont(font);
}
Expand Down

0 comments on commit af217e6

Please sign in to comment.