From ecd78168271cfe71715e074a50752712f4aa3229 Mon Sep 17 00:00:00 2001 From: Tero Ahola Date: Mon, 10 Oct 2011 17:02:33 +0200 Subject: Fixed resource leak when setting QProgressBar style sheet Task-number: QTBUG-19110 Merge-request: 2687 Reviewed-by: Frederik Gladhorn --- src/gui/styles/qwindowsstyle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index 342c4c6..2244c11 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); } } } -- cgit v0.12