diff options
-rw-r--r-- | src/templates/qquickcontrol.cpp | 2 | ||||
-rw-r--r-- | src/templates/qquickcontrol_p_p.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/templates/qquickcontrol.cpp b/src/templates/qquickcontrol.cpp index d441fc85..bdca042a 100644 --- a/src/templates/qquickcontrol.cpp +++ b/src/templates/qquickcontrol.cpp @@ -214,7 +214,7 @@ void QQuickControlPrivate::updateFontRecur(QQuickItem *i, const QFont &f) { foreach (QQuickItem *child, i->childItems()) { if (QQuickControl *qc = qobject_cast<QQuickControl *>(child)) { - QQuickControlPrivate *qcp = qc->d_func(); + QQuickControlPrivate *qcp = QQuickControlPrivate::get(qc); qcp->resolveFont(); } else if (QQuickLabel *ql = qobject_cast<QQuickLabel *>(child)) { QQuickLabelPrivate *qlp = QQuickLabelPrivate::get(ql); diff --git a/src/templates/qquickcontrol_p_p.h b/src/templates/qquickcontrol_p_p.h index a9046705..a76e4e6d 100644 --- a/src/templates/qquickcontrol_p_p.h +++ b/src/templates/qquickcontrol_p_p.h @@ -61,6 +61,11 @@ class Q_QUICKTEMPLATES_EXPORT QQuickControlPrivate : public QQuickItemPrivate public: QQuickControlPrivate(); + static QQuickControlPrivate *get(QQuickControl *control) + { + return control->d_func(); + } + void mirrorChange() Q_DECL_OVERRIDE; void setTopPadding(qreal value, bool reset = false); |