diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index af2007a4d18..81f0cde407f 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -3144,7 +3144,7 @@ void QFileDialogPrivate::createWidgets() // filetype qFileDialogUi->fileTypeCombo->setDuplicatesEnabled(false); - qFileDialogUi->fileTypeCombo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); + qFileDialogUi->fileTypeCombo->setSizeAdjustPolicy(QComboBox::AdjustToContentsOnFirstShow); qFileDialogUi->fileTypeCombo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(int)), q, SLOT(_q_useNameFilter(int))); diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 8c05c6de7ac..df8e7b4a3fb 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -894,7 +894,7 @@ QStyleOptionComboBox QComboBoxPrivateContainer::comboStyleOption() const \value AdjustToContents The combobox will always adjust to the contents \value AdjustToContentsOnFirstShow The combobox will adjust to its contents the first time it is shown. - \value AdjustToMinimumContentsLength Use AdjustToContents or AdjustToContentsOnFirstShow instead. + \omitvalue AdjustToMinimumContentsLength \value AdjustToMinimumContentsLengthWithIcon The combobox will adjust to \l minimumContentsLength plus space for an icon. For performance reasons use this policy on large models. */ diff --git a/src/widgets/widgets/qcombobox.h b/src/widgets/widgets/qcombobox.h index 1f6e2fcdb30..e0b213bc893 100644 --- a/src/widgets/widgets/qcombobox.h +++ b/src/widgets/widgets/qcombobox.h @@ -137,8 +137,11 @@ public: enum SizeAdjustPolicy { AdjustToContents, AdjustToContentsOnFirstShow, - AdjustToMinimumContentsLength, // ### Qt 6: remove - AdjustToMinimumContentsLengthWithIcon +#if QT_DEPRECATED_SINCE(5, 15) + AdjustToMinimumContentsLength Q_DECL_ENUMERATOR_DEPRECATED_X( + "Use AdjustToContents or AdjustToContentsOnFirstShow"), // ### Qt 6: remove +#endif + AdjustToMinimumContentsLengthWithIcon = AdjustToContentsOnFirstShow + 2 }; Q_ENUM(SizeAdjustPolicy)