mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
Drop obsolete version check
We require Qt 5.14 now.
This commit is contained in:
parent
de69336178
commit
d9956c620e
|
@ -21,13 +21,8 @@ KItemListSmoothScroller::KItemListSmoothScroller(QScrollBar* scrollBar,
|
||||||
m_animation(nullptr)
|
m_animation(nullptr)
|
||||||
{
|
{
|
||||||
m_animation = new QPropertyAnimation(this);
|
m_animation = new QPropertyAnimation(this);
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
|
||||||
const int animationDuration = m_scrollBar->style()->styleHint(QStyle::SH_Widget_Animation_Duration, nullptr, m_scrollBar);
|
const int animationDuration = m_scrollBar->style()->styleHint(QStyle::SH_Widget_Animation_Duration, nullptr, m_scrollBar);
|
||||||
const bool animationEnabled = (animationDuration > 0);
|
const bool animationEnabled = (animationDuration > 0);
|
||||||
#else
|
|
||||||
const int animationDuration = 100;
|
|
||||||
const bool animationEnabled = m_scrollBar->style()->styleHint(QStyle::SH_Widget_Animate, nullptr, m_scrollBar);
|
|
||||||
#endif
|
|
||||||
m_animation->setDuration(animationEnabled ? animationDuration : 1);
|
m_animation->setDuration(animationEnabled ? animationDuration : 1);
|
||||||
connect(m_animation, &QPropertyAnimation::stateChanged,
|
connect(m_animation, &QPropertyAnimation::stateChanged,
|
||||||
this, &KItemListSmoothScroller::slotAnimationStateChanged);
|
this, &KItemListSmoothScroller::slotAnimationStateChanged);
|
||||||
|
|
Loading…
Reference in a new issue