aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicktextarea.cpp
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2019-11-07 14:07:53 +0100
committerAndy Shaw <andy.shaw@qt.io>2019-11-08 12:38:38 +0100
commitc8dd650616278fda0f79bd237833de1ade5d947a (patch)
tree0eea4c77c95d8733abb2f7b57220476018bdcc50 /src/quicktemplates2/qquicktextarea.cpp
parent6f8ed8a6130f5583ec24220ddf440877dc45afa0 (diff)
Unset the resolved font's families if it was not set before
When the font is resolved, if the font does not have families set then it will set it to be the family to ensure that it has the right precedence. Therefore we need to reset the families setting so that it does not act like a font has changed after being resolved when it really hasn't. Fixes: QTBUG-79790 Change-Id: I03c6f1456dbe5f136181b1c3a0e22fdc0fa66679 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquicktextarea.cpp')
-rw-r--r--src/quicktemplates2/qquicktextarea.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquicktextarea.cpp b/src/quicktemplates2/qquicktextarea.cpp
index f7b8969c..ef59bd93 100644
--- a/src/quicktemplates2/qquicktextarea.cpp
+++ b/src/quicktemplates2/qquicktextarea.cpp
@@ -253,7 +253,10 @@ void QQuickTextAreaPrivate::inheritFont(const QFont &font)
parentFont.resolve(extra.isAllocated() ? extra->requestedFont.resolve() | font.resolve() : font.resolve());
const QFont defaultFont = QQuickTheme::font(QQuickTheme::TextArea);
- const QFont resolvedFont = parentFont.resolve(defaultFont);
+ QFont resolvedFont = parentFont.resolve(defaultFont);
+ // See comment in QQuickControlPrivate::inheritFont
+ if (defaultFont.families().isEmpty())
+ resolvedFont.setFamilies(QStringList());
setFont_helper(resolvedFont);
}