diff options
Diffstat (limited to 'src/quicktemplates2/qquicktextarea.cpp')
-rw-r--r-- | src/quicktemplates2/qquicktextarea.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/quicktemplates2/qquicktextarea.cpp b/src/quicktemplates2/qquicktextarea.cpp index 183c929eca..f1ea24d831 100644 --- a/src/quicktemplates2/qquicktextarea.cpp +++ b/src/quicktemplates2/qquicktextarea.cpp @@ -226,14 +226,14 @@ void QQuickTextAreaPrivate::resizeBackground() const auto flickable = qobject_cast<QQuickFlickable *>(background->parentItem()); QQuickItemPrivate *p = QQuickItemPrivate::get(background); - if (((!p->widthValid || !extra.isAllocated() || !extra->hasBackgroundWidth) && qFuzzyIsNull(background->x())) + if (((!p->widthValid() || !extra.isAllocated() || !extra->hasBackgroundWidth) && qFuzzyIsNull(background->x())) || (extra.isAllocated() && (extra->hasLeftInset || extra->hasRightInset))) { const qreal bgWidth = flickable ? flickable->width() : width; background->setX(getLeftInset()); background->setWidth(bgWidth - getLeftInset() - getRightInset()); } - if (((!p->heightValid || !extra.isAllocated() || !extra->hasBackgroundHeight) && qFuzzyIsNull(background->y())) + if (((!p->heightValid() || !extra.isAllocated() || !extra->hasBackgroundHeight) && qFuzzyIsNull(background->y())) || (extra.isAllocated() && (extra->hasTopInset || extra->hasBottomInset))) { const qreal bgHeight = flickable ? flickable->height() : height; background->setY(getTopInset()); @@ -416,9 +416,9 @@ void QQuickTextAreaPrivate::itemGeometryChanged(QQuickItem *item, QQuickGeometry // Only set hasBackgroundWidth/Height if it was a width/height change, // otherwise we're prevented from setting a width/height in the future. if (change.widthChange()) - extra.value().hasBackgroundWidth = p->widthValid; + extra.value().hasBackgroundWidth = p->widthValid(); if (change.heightChange()) - extra.value().hasBackgroundHeight = p->heightValid; + extra.value().hasBackgroundHeight = p->heightValid(); } if (flickable) @@ -617,9 +617,9 @@ void QQuickTextArea::setBackground(QQuickItem *background) if (background) { QQuickItemPrivate *p = QQuickItemPrivate::get(background); - if (p->widthValid || p->heightValid) { - d->extra.value().hasBackgroundWidth = p->widthValid; - d->extra.value().hasBackgroundHeight = p->heightValid; + if (p->widthValid() || p->heightValid()) { + d->extra.value().hasBackgroundWidth = p->widthValid(); + d->extra.value().hasBackgroundHeight = p->heightValid(); } if (d->flickable) background->setParentItem(d->flickable); |