diff options
author | Liang Qi <liang.qi@qt.io> | 2018-10-17 10:35:28 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-10-17 10:35:28 +0200 |
commit | ccf26f6a88e116abdf8e53acdc02dbd98a4a8dc4 (patch) | |
tree | 40aaca99471edc709d38e6f82153576bad86747f /src/widgets/widgets/qtabbar_p.h | |
parent | 8ff1ae89bfa32c586e3b44b71dfc49d294a3e043 (diff) | |
parent | 3eebadc1734463afa469dcd08eab8c5d2557dec6 (diff) |
Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
src/plugins/platformthemes/platformthemes.pro
src/printsupport/kernel/qplatformprintdevice.cpp
Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
Diffstat (limited to 'src/widgets/widgets/qtabbar_p.h')
-rw-r--r-- | src/widgets/widgets/qtabbar_p.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/widgets/widgets/qtabbar_p.h b/src/widgets/widgets/qtabbar_p.h index 3948b42bc1..9b798e89c9 100644 --- a/src/widgets/widgets/qtabbar_p.h +++ b/src/widgets/widgets/qtabbar_p.h @@ -58,7 +58,9 @@ #include <qicon.h> #include <qtoolbutton.h> #include <qdebug.h> +#if QT_CONFIG(animation) #include <qvariantanimation.h> +#endif #define ANIMATION_DURATION 250 @@ -107,9 +109,9 @@ public: inline Tab(const QIcon &ico, const QString &txt) : enabled(true) , shortcutId(0), text(txt), icon(ico), leftWidget(0), rightWidget(0), lastTab(-1), dragOffset(0) -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) , animation(0) -#endif //QT_NO_ANIMATION +#endif // animation {} bool operator==(const Tab &other) const { return &other == this; } bool enabled; @@ -136,7 +138,7 @@ public: QString accessibleName; #endif -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) ~Tab() { delete animation; } struct TabBarAnimation : public QVariantAnimation { TabBarAnimation(Tab *t, QTabBarPrivate *_priv) : tab(t), priv(_priv) @@ -166,7 +168,7 @@ public: #else void startAnimation(QTabBarPrivate *priv, int duration) { Q_UNUSED(duration); priv->moveTabFinished(priv->tabList.indexOf(*this)); } -#endif //QT_NO_ANIMATION +#endif // animation }; QList<Tab> tabList; mutable QHash<QString, QSize> textSizes; |