diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-04-11 01:00:13 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-04-11 14:59:13 +0200 |
commit | 58a42898006f221807a08557f588a2d973a7ada2 (patch) | |
tree | 62d92617eae5df5aae666ea0902159498b285b24 /src/widgets/widgets/qcombobox.cpp | |
parent | 033d01bd6e2aef740ad1408a04d3ca0ae3b9ba9b (diff) | |
parent | 1ec350e35fcea87c527b36cf429b595731059240 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
tests/auto/network/socket/platformsocketengine/platformsocketengine.pri
Change-Id: I22daf269a8f28f80630b5f521b91637531156404
Diffstat (limited to 'src/widgets/widgets/qcombobox.cpp')
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index a854ce2cb8..fd82384c03 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -385,6 +385,16 @@ int QComboBoxPrivate::computeWidthHint() const return tmp.width(); } +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED +static constexpr QComboBox::SizeAdjustPolicy deprecatedAdjustToMinimumContentsLength() +{ + return QComboBox::AdjustToMinimumContentsLength; +} +QT_WARNING_POP +#endif + QSize QComboBoxPrivate::recomputeSizeHint(QSize &sh) const { Q_Q(const QComboBox); @@ -412,10 +422,11 @@ QSize QComboBoxPrivate::recomputeSizeHint(QSize &sh) const } } break; - case QComboBox::AdjustToMinimumContentsLength: + case deprecatedAdjustToMinimumContentsLength(): for (int i = 0; i < count && !hasIcon; ++i) hasIcon = !q->itemIcon(i).isNull(); - default: + break; + case QComboBox::AdjustToMinimumContentsLengthWithIcon: ; } } else { @@ -1742,7 +1753,7 @@ void QComboBox::setMinimumContentsLength(int characters) d->minimumContentsLength = characters; if (d->sizeAdjustPolicy == AdjustToContents - || d->sizeAdjustPolicy == AdjustToMinimumContentsLength + || d->sizeAdjustPolicy == deprecatedAdjustToMinimumContentsLength() || d->sizeAdjustPolicy == AdjustToMinimumContentsLengthWithIcon) { d->sizeHint = QSize(); d->adjustComboBoxSize(); |