diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-07-29 08:46:49 +0200 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-08-10 05:37:17 +0000 |
commit | 414026ad9c3e92b1c6a715543175acb922d703e2 (patch) | |
tree | 70cab464b13ace5a3e3ab56e70347b4ee7f433e2 /src/widgets/widgets/qcombobox.cpp | |
parent | d1a3e674b6b9a98e16aa26fe05688e7099cd2b9b (diff) |
Convert features.scrollbar to QT_[REQUIRE_]CONFIG
Change-Id: Id6ea899c0fddf0de636701cfdc5f01ba20024976
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/widgets/qcombobox.cpp')
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 506986f4ba..a4e71662c7 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -478,7 +478,7 @@ QComboBoxPrivateContainer::QComboBoxPrivateContainer(QAbstractItemView *itemView void QComboBoxPrivateContainer::scrollItemView(int action) { -#ifndef QT_NO_SCROLLBAR +#if QT_CONFIG(scrollbar) if (view->verticalScrollBar()) view->verticalScrollBar()->triggerAction(static_cast<QAbstractSlider::SliderAction>(action)); #endif @@ -489,7 +489,7 @@ void QComboBoxPrivateContainer::scrollItemView(int action) */ void QComboBoxPrivateContainer::updateScrollers() { -#ifndef QT_NO_SCROLLBAR +#if QT_CONFIG(scrollbar) if (!top || !bottom) return; @@ -516,7 +516,7 @@ void QComboBoxPrivateContainer::updateScrollers() top->hide(); bottom->hide(); } -#endif // QT_NO_SCROLLBAR +#endif // QT_CONFIG(scrollbar) } /* @@ -547,7 +547,7 @@ void QComboBoxPrivateContainer::setItemView(QAbstractItemView *itemView) if (view) { view->removeEventFilter(this); view->viewport()->removeEventFilter(this); -#ifndef QT_NO_SCROLLBAR +#if QT_CONFIG(scrollbar) disconnect(view->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(updateScrollers())); disconnect(view->verticalScrollBar(), SIGNAL(rangeChanged(int,int)), @@ -572,7 +572,7 @@ void QComboBoxPrivateContainer::setItemView(QAbstractItemView *itemView) view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); QStyleOptionComboBox opt = comboStyleOption(); const bool usePopup = combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo); -#ifndef QT_NO_SCROLLBAR +#if QT_CONFIG(scrollbar) if (usePopup) view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); #endif @@ -584,7 +584,7 @@ void QComboBoxPrivateContainer::setItemView(QAbstractItemView *itemView) view->setFrameStyle(QFrame::NoFrame); view->setLineWidth(0); view->setEditTriggers(QAbstractItemView::NoEditTriggers); -#ifndef QT_NO_SCROLLBAR +#if QT_CONFIG(scrollbar) connect(view->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(updateScrollers())); connect(view->verticalScrollBar(), SIGNAL(rangeChanged(int,int)), |