diff options
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; |