~zsombi/ubuntu-ui-toolkit/deprecatedQtFuncs

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/plugin/privates/threelabelsslot_p.cpp

  • Committer: Tarmac
  • Author(s): Andrea Bernabei
  • Date: 2015-11-11 10:49:52 UTC
  • mfrom: (1709.1.7 staging)
  • Revision ID: tarmac-20151111104952-ygim5b91ug6gweyh
ListItemLayout: set QML context of the predefined labels. Fixes lp1514173. Fixes: https://bugs.launchpad.net/bugs/1514173.

Approved by Zsombor Egri, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
    Q_D(UCThreeLabelsSlot);
144
144
    if (d->m_title == Q_NULLPTR) {
145
145
        d->m_title = new UCLabel(this);
146
 
        QQmlData::get(d->m_title, true);
 
146
        QQmlEngine::setContextForObject(d->m_title, qmlContext(this));
147
147
        d->m_title->init();
148
148
 
149
149
        QQuickAnchors *titleAnchors = QQuickItemPrivate::get(d->m_title)->anchors();
180
180
    Q_D(UCThreeLabelsSlot);
181
181
    if (d->m_subtitle == Q_NULLPTR) {
182
182
        d->m_subtitle = new UCLabel(this);
183
 
        QQmlData::get(d->m_subtitle, true);
 
183
        QQmlEngine::setContextForObject(d->m_subtitle, qmlContext(this));
184
184
        d->m_subtitle->init();
185
185
 
186
186
        QQuickAnchors *subtitleAnchors = QQuickItemPrivate::get(d->m_subtitle)->anchors();
202
202
    Q_D(UCThreeLabelsSlot);
203
203
    if (d->m_summary == Q_NULLPTR) {
204
204
        d->m_summary = new UCLabel(this);
205
 
        QQmlData::get(d->m_summary, true);
 
205
        QQmlEngine::setContextForObject(d->m_summary, qmlContext(this));
206
206
        d->m_summary->init();
207
207
 
208
208
        QQuickAnchors *summaryAnchors = QQuickItemPrivate::get(d->m_summary)->anchors();