diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-10 17:05:10 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-10-23 09:58:57 +0200 |
commit | 11bad6109606794091adc3b8a14070ac09707f45 (patch) | |
tree | 603d07bada752a534a8549c6d008b9b8a4aa832a /src/widgets | |
parent | a618c260ed0d1de711a5bc20337f9b8c3835c407 (diff) |
Deprecate QVariant::Type
It's been obsolete for a long time already. Make sure
the compiler now warns about it and remove all remaining
uses in qtbase.
Change-Id: I0ff80311184dba52d2ba5f4e2fabe0d47fdc59d7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/doc/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp | 2 | ||||
-rw-r--r-- | src/widgets/itemviews/qitemeditorfactory.cpp | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/doc/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp b/src/widgets/doc/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp index 9745700b07..30ba269ce6 100644 --- a/src/widgets/doc/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp +++ b/src/widgets/doc/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp @@ -64,7 +64,7 @@ QItemEditorFactory *factory = new QItemEditorFactory; //! [2] QItemEditorFactory *editorFactory = new QItemEditorFactory; QItemEditorCreatorBase *creator = new QStandardItemEditorCreator<MyFancyDateTimeEdit>(); -editorFactory->registerEditor(QVariant::DateType, creator); +editorFactory->registerEditor(QMetaType::QDateTime, creator); //! [2] diff --git a/src/widgets/itemviews/qitemeditorfactory.cpp b/src/widgets/itemviews/qitemeditorfactory.cpp index b29fd373bc..4811d32ed0 100644 --- a/src/widgets/itemviews/qitemeditorfactory.cpp +++ b/src/widgets/itemviews/qitemeditorfactory.cpp @@ -432,7 +432,7 @@ QItemEditorCreatorBase::~QItemEditorCreatorBase() the creator is registered for. For example, a creator which constructs QCheckBox widgets to edit boolean values would return the \l{QCheckBox::checkable}{checkable} property name from this function, - and must be registered in the item editor factory for the QVariant::Bool + and must be registered in the item editor factory for the QMetaType::Bool type. Note: Since Qt 4.2 the item delegates query the user property of widgets, @@ -513,7 +513,7 @@ QItemEditorCreatorBase::~QItemEditorCreatorBase() Setting the \c editorFactory created above in an item delegate via QStyledItemDelegate::setItemEditorFactory() makes sure that all values of type - QVariant::DateTime will be edited in \c{MyFancyDateTimeEdit}. + QMetaType::QDateTime will be edited in \c{MyFancyDateTimeEdit}. The editor must provide a user property that will contain the editing data. The property is used by \l{QStyledItemDelegate}s to set diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 7f7bcefb7a..db65285aef 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -2232,7 +2232,7 @@ QIcon QComboBox::itemIcon(int index) const /*! Returns the data for the given \a role in the given \a index in the - combobox, or QVariant::Invalid if there is no data for this role. + combobox, or an invalid QVariant if there is no data for this role. */ QVariant QComboBox::itemData(int index, int role) const { |