diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-11-08 14:16:41 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-11-08 14:16:42 +0100 |
commit | 9c05807b951167bc0c8385811c9df1bd9d48ca6d (patch) | |
tree | ce5b69e5830c7edaf9014776049038c45dd90c44 /src/quicktemplates2/qquickcontrol.cpp | |
parent | dc62583e8e1f864b8a22fbe79f9fe25ca3a4e9dc (diff) | |
parent | c8dd650616278fda0f79bd237833de1ade5d947a (diff) |
Merge remote-tracking branch 'origin/5.13' into 5.14
Change-Id: I551670d92af2bc96d5d8b8724bf5b280e94498c7
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); } |