aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/qquickbusyindicator.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-02-11 18:24:18 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-02-12 12:44:07 +0000
commit244cc6eec931f0b46e3d2b8ea32f03b32cb1023e (patch)
treebd590e8e4b98e82ba6b820d8543b486f4082fb4c /src/templates/qquickbusyindicator.cpp
parent8d5a8ee53d089cea7543040ecb11d165ab34c506 (diff)
Templates: follow the Qt coding style
Return early to keep the indentation low. This style was already used in many areas, so now the same style is consistently used everywhere. Change-Id: Ibc7c05147fdcf226ad1cbdd26cd70e1da89108af Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/templates/qquickbusyindicator.cpp')
-rw-r--r--src/templates/qquickbusyindicator.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/templates/qquickbusyindicator.cpp b/src/templates/qquickbusyindicator.cpp
index d4e07d44..3cfd96cb 100644
--- a/src/templates/qquickbusyindicator.cpp
+++ b/src/templates/qquickbusyindicator.cpp
@@ -98,10 +98,11 @@ bool QQuickBusyIndicator::isRunning() const
void QQuickBusyIndicator::setRunning(bool running)
{
Q_D(QQuickBusyIndicator);
- if (d->running != running) {
- d->running = running;
- emit runningChanged();
- }
+ if (d->running == running)
+ return;
+
+ d->running = running;
+ emit runningChanged();
}
#ifndef QT_NO_ACCESSIBILITY