summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qcombobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets/qcombobox.cpp')
-rw-r--r--src/widgets/widgets/qcombobox.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 58a1ff9e7f..4679ed95c5 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -487,7 +487,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
@@ -506,7 +506,7 @@ void QComboBoxPrivateContainer::hideScrollers()
*/
void QComboBoxPrivateContainer::updateScrollers()
{
-#ifndef QT_NO_SCROLLBAR
+#if QT_CONFIG(scrollbar)
if (!top || !bottom)
return;
@@ -533,7 +533,7 @@ void QComboBoxPrivateContainer::updateScrollers()
top->hide();
bottom->hide();
}
-#endif // QT_NO_SCROLLBAR
+#endif // QT_CONFIG(scrollbar)
}
/*
@@ -564,7 +564,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)),
@@ -589,7 +589,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
@@ -601,7 +601,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)),
@@ -758,7 +758,7 @@ void QComboBoxPrivateContainer::hideEvent(QHideEvent *)
{
emit resetButton();
combo->update();
-#ifndef QT_NO_GRAPHICSVIEW
+#if QT_CONFIG(graphicsview)
// QGraphicsScenePrivate::removePopup closes the combo box popup, it hides it non-explicitly.
// Hiding/showing the QComboBox after this will unexpectedly show the popup as well.
// Re-hiding the popup container makes sure it is explicitly hidden.