Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
Description
QItemDelegate::setEditorData() contains a couple of Qt 5 to-do comments (and the same code also appears in QStyledItemDelegate::setEditorData()):
qtbase/src/widgets/itemviews/qitemdelegate.cpp
void QItemDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const { #ifdef QT_NO_PROPERTIES Q_UNUSED(editor); Q_UNUSED(index); #else Q_D(const QItemDelegate); QVariant v = index.data(Qt::EditRole); QByteArray n = editor->metaObject()->userProperty().name(); // ### Qt 5: remove // A work-around for missing "USER true" in qdatetimeedit.h for // QTimeEdit's time property and QDateEdit's date property. // It only triggers if the default user property "dateTime" is // reported for QTimeEdit and QDateEdit. if (n == "dateTime") { if (editor->inherits("QTimeEdit")) n = "time"; else if (editor->inherits("QDateEdit")) n = "date"; } // ### Qt 5: give QComboBox a USER property if (n.isEmpty() && editor->inherits("QComboBox")) n = d->editorFactory()->valuePropertyName(v.userType()); if (!n.isEmpty()) { if (!v.isValid()) v = QVariant(editor->property(n).userType(), (const void *)0); editor->setProperty(n, v); } #endif
These comments should be actioned for Qt 5.0.0 (if that can be done without breaking source-compatibility), removed, or changed to Qt 6 to-do's.
Attachments
Issue Links
- resulted from
-
QTBUG-23524 [API] Grep the source for Qt5 todo items
- Closed