diff options
Diffstat (limited to 'src/templates/qquickpane.cpp')
-rw-r--r-- | src/templates/qquickpane.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/templates/qquickpane.cpp b/src/templates/qquickpane.cpp index 9bedb150..e8eeccdb 100644 --- a/src/templates/qquickpane.cpp +++ b/src/templates/qquickpane.cpp @@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickPane \inqmlmodule Qt.labs.controls \ingroup qtlabscontrols-containers - \brief A pane control. + \brief Provides a background matching with the application style and theme. Pane provides a background color that matches with the application style and theme. Pane does not provide a layout of its own, but requires you to @@ -101,10 +101,11 @@ qreal QQuickPane::contentWidth() const void QQuickPane::setContentWidth(qreal width) { Q_D(QQuickPane); - if (d->contentWidth != width) { - d->contentWidth = width; - emit contentWidthChanged(); - } + if (qFuzzyCompare(d->contentWidth, width)) + return; + + d->contentWidth = width; + emit contentWidthChanged(); } /*! @@ -125,10 +126,11 @@ qreal QQuickPane::contentHeight() const void QQuickPane::setContentHeight(qreal height) { Q_D(QQuickPane); - if (d->contentHeight != height) { - d->contentHeight = height; - emit contentHeightChanged(); - } + if (qFuzzyCompare(d->contentHeight, height)) + return; + + d->contentHeight = height; + emit contentHeightChanged(); } /*! @@ -142,7 +144,7 @@ void QQuickPane::setContentHeight(qreal height) QQmlListProperty<QObject> QQuickPane::contentData() { Q_D(QQuickPane); - return QQmlListProperty<QObject>(d->contentItem, Q_NULLPTR, + return QQmlListProperty<QObject>(d->contentItem, nullptr, QQuickItemPrivate::data_append, QQuickItemPrivate::data_count, QQuickItemPrivate::data_at, @@ -159,7 +161,7 @@ QQmlListProperty<QObject> QQuickPane::contentData() QQmlListProperty<QQuickItem> QQuickPane::contentChildren() { Q_D(QQuickPane); - return QQmlListProperty<QQuickItem>(d->contentItem, Q_NULLPTR, + return QQmlListProperty<QQuickItem>(d->contentItem, nullptr, QQuickItemPrivate::children_append, QQuickItemPrivate::children_count, QQuickItemPrivate::children_at, |