aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/qquickcontrol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/qquickcontrol.cpp')
-rw-r--r--src/templates/qquickcontrol.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/templates/qquickcontrol.cpp b/src/templates/qquickcontrol.cpp
index 0e14bc37..78ecaa91 100644
--- a/src/templates/qquickcontrol.cpp
+++ b/src/templates/qquickcontrol.cpp
@@ -287,11 +287,13 @@ void QQuickControlPrivate::resolveFont()
void QQuickControlPrivate::updateFont(const QFont &f)
{
Q_Q(QQuickControl);
+ const bool changed = font != f;
font = f;
QQuickControlPrivate::updateFontRecur(q, f);
- emit q->fontChanged();
+ if (changed)
+ emit q->fontChanged();
}
void QQuickControlPrivate::updateFontRecur(QQuickItem *item, const QFont &f)
@@ -411,7 +413,7 @@ QFont QQuickControl::font() const
void QQuickControl::setFont(const QFont &f)
{
Q_D(QQuickControl);
- if (d->font == f)
+ if (d->font.resolve() == f.resolve() && d->font == f)
return;
// Determine which font is inherited from this control's ancestors and