diff options
author | Liang Qi <liang.qi@qt.io> | 2017-08-15 16:30:10 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-08-15 16:31:48 +0200 |
commit | 106d3b9bf93325ea93c678270290b2c3dda9b764 (patch) | |
tree | 26c56932d60964c83e81d9c33d6f37ebc36d6c56 /src/widgets/widgets/qcombobox.cpp | |
parent | 79f679da9483c12979500dd48bc096d33af9ca6f (diff) | |
parent | 8bebded9ab02b8eec67c44bfddf802d6bf9cda3c (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/plugins/platforms/cocoa/qcocoamenu.h
src/plugins/platforms/cocoa/qcocoamenu.mm
src/plugins/platforms/cocoa/qcocoawindow.mm
src/widgets/styles/qstylehelper_p.h
Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
Diffstat (limited to 'src/widgets/widgets/qcombobox.cpp')
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 14 |
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. |