summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-03-30 13:42:54 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-04-04 06:54:28 +0000
commit29bb28d52305a7a47759cf9bb8395e2132bf68bc (patch)
tree6de5ff768fab8509ee8d1b38be2de56a47149360
parentddfd744d83344fe694f162baca68154c43448d21 (diff)
QTabBar: properly clean up move animation
In TabBarAnimation::updateState() the wrong parameter was used to determine if the animation has stopped or not. This lead to a call to moveTabFinished() when the animation started and not when it was finished. Task-number: QTBUG-42951 Change-Id: I213c7f5e863a9a4e33bd472de93933efebf63fc7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
-rw-r--r--src/widgets/widgets/qtabbar.cpp2
-rw-r--r--src/widgets/widgets/qtabbar_p.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index 258e018151..9df1a4823a 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -2682,7 +2682,7 @@ void QTabBarPrivate::Tab::TabBarAnimation::updateCurrentValue(const QVariant &cu
priv->moveTab(priv->tabList.indexOf(*tab), current.toInt());
}
-void QTabBarPrivate::Tab::TabBarAnimation::updateState(QAbstractAnimation::State, QAbstractAnimation::State newState)
+void QTabBarPrivate::Tab::TabBarAnimation::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State)
{
if (newState == Stopped) priv->moveTabFinished(priv->tabList.indexOf(*tab));
}
diff --git a/src/widgets/widgets/qtabbar_p.h b/src/widgets/widgets/qtabbar_p.h
index 1092878f2c..f303ed54d1 100644
--- a/src/widgets/widgets/qtabbar_p.h
+++ b/src/widgets/widgets/qtabbar_p.h
@@ -144,7 +144,7 @@ public:
void updateCurrentValue(const QVariant &current) override;
- void updateState(State, State newState) override;
+ void updateState(State newState, State) override;
private:
//these are needed for the callbacks
Tab *tab;