diff options
author | Liang Qi <liang.qi@qt.io> | 2018-09-26 15:39:35 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-10-12 14:26:15 +0000 |
commit | c593492d1678a2ec08f1bfffcb572459b3bc6c00 (patch) | |
tree | a9427b13e0f3aa252d68decc862de5acb4dc3b17 /src/widgets/widgets/qtabbar.cpp | |
parent | 0509383cf2852f2aebd1efd75413835747c8f341 (diff) |
Modernize the "animation" feature
Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/widgets/qtabbar.cpp')
-rw-r--r-- | src/widgets/widgets/qtabbar.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index 8af70d0f9c..98e15c8f17 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -2109,13 +2109,13 @@ void QTabBarPrivate::moveTabFinished(int index) Q_Q(QTabBar); bool cleanup = (pressedIndex == index) || (pressedIndex == -1) || !validIndex(index); bool allAnimationsFinished = true; -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) for(int i = 0; allAnimationsFinished && i < tabList.count(); ++i) { const Tab &t = tabList.at(i); if (t.animation && t.animation->state() == QAbstractAnimation::Running) allAnimationsFinished = false; } -#endif //QT_NO_ANIMATION +#endif // animation if (allAnimationsFinished && cleanup) { if(movingTab) movingTab->setVisible(false); // We might not get a mouse release @@ -2680,7 +2680,7 @@ void CloseButton::paintEvent(QPaintEvent *) style()->drawPrimitive(QStyle::PE_IndicatorTabClose, &opt, &p, this); } -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) void QTabBarPrivate::Tab::TabBarAnimation::updateCurrentValue(const QVariant ¤t) { priv->moveTab(priv->tabList.indexOf(*tab), current.toInt()); |