summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTero Ahola <tero.ahola@digia.com>2011-10-10 17:02:33 +0200
committerQt Commercial Integration <QtCommercial@digia.com>2012-01-31 12:25:06 +0200
commit272a8bdb411b44195cf5f6fb3bd2fcb59e780c7a (patch)
tree4827e63ed03da3cd802ccedeea9e9925b5b547ef
parentfc2c0094cf661825ce8f3744eefaa65b49426ad2 (diff)
Fixed resource leak when setting QProgressBar style sheet
Task-number: QTBUG-19110 Merge-request: 2687 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
-rw-r--r--src/gui/styles/qwindowsstyle.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index 915cba4d24..75ff911026 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -218,7 +218,8 @@ bool QWindowsStyle::eventFilter(QObject *o, QEvent *e)
d->bars << bar;
if (d->bars.size() == 1) {
Q_ASSERT(d->animationFps> 0);
- d->animateTimer = startTimer(1000 / d->animationFps);
+ if (d->animateTimer == 0)
+ d->animateTimer = startTimer(1000 / d->animationFps);
}
}
}