diff options
Diffstat (limited to 'src/templates/qquickgroupbox.cpp')
-rw-r--r-- | src/templates/qquickgroupbox.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/templates/qquickgroupbox.cpp b/src/templates/qquickgroupbox.cpp index 1dba509b..33f7c672 100644 --- a/src/templates/qquickgroupbox.cpp +++ b/src/templates/qquickgroupbox.cpp @@ -108,10 +108,11 @@ QString QQuickGroupBox::title() const void QQuickGroupBox::setTitle(const QString &title) { Q_D(QQuickGroupBox); - if (d->title != title) { - d->title = title; - emit titleChanged(); - } + if (d->title == title) + return; + + d->title = title; + emit titleChanged(); } /*! @@ -130,13 +131,14 @@ QQuickItem *QQuickGroupBox::label() const void QQuickGroupBox::setLabel(QQuickItem *label) { Q_D(QQuickGroupBox); - if (d->label != label) { - delete d->label; - d->label = label; - if (label && !label->parentItem()) - label->setParentItem(this); - emit labelChanged(); - } + if (d->label == label) + return; + + delete d->label; + d->label = label; + if (label && !label->parentItem()) + label->setParentItem(this); + emit labelChanged(); } QFont QQuickGroupBox::defaultFont() const |