diff options
author | Jerome Pasion <jerome.pasion@digia.com> | 2012-11-02 14:41:27 +0100 |
---|---|---|
committer | Jerome Pasion <jerome.pasion@digia.com> | 2012-11-02 14:41:27 +0100 |
commit | c808dd27459e030fde0577feb8ba06e3bd465526 (patch) | |
tree | 4bf898dc4a88e2b03c9716f940638a2e01c6c0ce /src/widgets/styles/qcommonstyle.cpp | |
parent | d9d8845d507a6bdbc9c9f24c0d9d86dca513461d (diff) | |
parent | 300534fc214f2547a63594ce0891e9a54c8f33ca (diff) |
Merge branch 'master' of ssh://codereview.qt-project.org/qt/qtbase into newdocs
Change-Id: I7e6cee190a341901dfbf8effb54ebccb91bf7a17
Diffstat (limited to 'src/widgets/styles/qcommonstyle.cpp')
-rw-r--r-- | src/widgets/styles/qcommonstyle.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 990245a113..2b6d843723 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -1081,13 +1081,9 @@ void QCommonStylePrivate::startAnimation(QStyleAnimation *animation) const /*! \internal */ void QCommonStylePrivate::stopAnimation(const QObject *target) const { - QStyleAnimation *animation = animations.value(target); - if (animation) { - if (animation->state() == QAbstractAnimation::Stopped) - animations.take(target)->deleteLater(); - else - animation->stop(); - } + QStyleAnimation *animation = animations.take(target); + if (animation && animation->state() != QAbstractAnimation::Stopped) + animation->stop(); } /*! \internal */ @@ -2777,7 +2773,6 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt, return widget->style()->subElementRect(QStyle::SE_FrameContents, opt, widget); else return subElementRect(QStyle::SE_FrameContents, opt, widget); - break; case QFrame::WinPanel: frameWidth = 2; |