diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-11-09 03:07:01 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-11-09 03:07:01 +0100 |
commit | cb182fb50e49fa88f7bf33f2407447167fd8048f (patch) | |
tree | 3e8cc6319ee9b2c4d20f7e0bcb784928f916146e /src/quicktemplates2/qquickcontrol.cpp | |
parent | 611422b5968ceac6cfba034116a3d1e107d8e2df (diff) | |
parent | 9c05807b951167bc0c8385811c9df1bd9d48ca6d (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ib14b8c77cefe7aaf5b11483d9a30b2ef05314598
Diffstat (limited to 'src/quicktemplates2/qquickcontrol.cpp')
-rw-r--r-- | src/quicktemplates2/qquickcontrol.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp index e156fb57..0ebaf9a3 100644 --- a/src/quicktemplates2/qquickcontrol.cpp +++ b/src/quicktemplates2/qquickcontrol.cpp @@ -549,7 +549,13 @@ void QQuickControlPrivate::inheritFont(const QFont &font) parentFont.resolve(extra.isAllocated() ? extra->requestedFont.resolve() | font.resolve() : font.resolve()); const QFont defaultFont = q->defaultFont(); - const QFont resolvedFont = parentFont.resolve(defaultFont); + QFont resolvedFont = parentFont.resolve(defaultFont); + // Since resolving the font will put the family() into the + // families() list if it is empty then we need to unset it + // so it does not act as if the font has changed (when it + // has not actually changed) + if (defaultFont.families().isEmpty()) + resolvedFont.setFamilies(QStringList()); setFont_helper(resolvedFont); } |