diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-03-10 12:27:53 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-03-11 12:12:57 +0000 |
commit | 96d5ffe51e8196ea60aab62a480f036daae67a63 (patch) | |
tree | 2d12160a3c09ddc512ce443b94aa79a75894fade /src/templates | |
parent | 58596e8ebbda8b5f086b9e1b29716181a4239433 (diff) |
Revert "QQuickControl: delayed the call of resolveFont()"
This reverts commit 3cba8b19c4e67cbcd6977bf141d7ddf2e54aae85.
The change was done to implement font inheritance for popups,
but it broke theme fonts for other controls. Since the former
was a mistake (see comments in the linked bug report), it's
best to revert back to what worked with theme fonts.
Change-Id: I863765c5061b02607cfe04a848ff39e3243bd25f
Task-number: QTBUG-50984
Task-number: QTBUG-51696
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Diffstat (limited to 'src/templates')
-rw-r--r-- | src/templates/qquickcontrol.cpp | 8 | ||||
-rw-r--r-- | src/templates/qquickcontrol_p.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/templates/qquickcontrol.cpp b/src/templates/qquickcontrol.cpp index 78ecaa91..f33a6fb2 100644 --- a/src/templates/qquickcontrol.cpp +++ b/src/templates/qquickcontrol.cpp @@ -841,11 +841,17 @@ void QQuickControl::setContentItem(QQuickItem *item) } } +void QQuickControl::classBegin() +{ + Q_D(QQuickControl); + QQuickItem::classBegin(); + d->resolveFont(); +} + void QQuickControl::componentComplete() { Q_D(QQuickControl); QQuickItem::componentComplete(); - d->resolveFont(); if (!d->hasLocale) d->locale = QQuickControlPrivate::calcLocale(d->parentItem); #ifndef QT_NO_ACCESSIBILITY diff --git a/src/templates/qquickcontrol_p.h b/src/templates/qquickcontrol_p.h index 413fb7f4..8d4055e5 100644 --- a/src/templates/qquickcontrol_p.h +++ b/src/templates/qquickcontrol_p.h @@ -144,6 +144,7 @@ protected: QQuickControl(QQuickControlPrivate &dd, QQuickItem *parent); + void classBegin() Q_DECL_OVERRIDE; void componentComplete() Q_DECL_OVERRIDE; void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE; |