aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-09-18 12:49:59 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-09-18 12:34:06 +0000
commit9827d50c720c91837e2674db246144717f3afb71 (patch)
treea667bbc8d5b7d2eac6223d1dceaba6f673bd7a8e
parentbca2e670e501f9fe1496ac0ee010fb967ddad067 (diff)
Add QQuickControlPrivate::get()
Change-Id: Ide0e32f5a91d866cb45a96414713facba3d48e6c Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
-rw-r--r--src/templates/qquickcontrol.cpp2
-rw-r--r--src/templates/qquickcontrol_p_p.h5
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);