summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qwindowsstyle.cpp
diff options
context:
space:
mode:
authorTero Ahola <tero.ahola@digia.com>2011-10-10 17:02:33 +0200
committerFrederik Gladhorn <frederik.gladhorn@nokia.com>2011-10-10 17:02:33 +0200
commitecd78168271cfe71715e074a50752712f4aa3229 (patch)
treef534fc13cc0c44c463b2ce25f6c4907b395bbf9d /src/gui/styles/qwindowsstyle.cpp
parentd6e97ef95406cef51dc94f0d38e481b85b7580ae (diff)
Fixed resource leak when setting QProgressBar style sheet
Task-number: QTBUG-19110 Merge-request: 2687 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/gui/styles/qwindowsstyle.cpp')
-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 342c4c6184..2244c11faf 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -221,7 +221,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);
}
}
}