From 8275611766bceecf045c75a59487d46c8f8a8d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Thu, 6 Jan 2022 16:03:21 +0100 Subject: Core: Remove 'properties' feature Even QtCore alone cannot be built without the properties feature since Qt 5.5. While fixing this is easy, other modules like dbus, networking are also using QObject::property() and friends liberally. All in all I doubt that anybody will miss the feature (otherwise it would have been fixed in the last decade). Change-Id: Iaf3cc20bda54ee2ff3b809fac8fa82b94ecc88c0 Reviewed-by: Lars Knoll Reviewed-by: Edward Welbourne --- src/widgets/itemviews/qitemdelegate.cpp | 11 ----------- src/widgets/itemviews/qstyleditemdelegate.cpp | 11 ----------- 2 files changed, 22 deletions(-) (limited to 'src/widgets/itemviews') diff --git a/src/widgets/itemviews/qitemdelegate.cpp b/src/widgets/itemviews/qitemdelegate.cpp index 9d755c0b55..2640d7163d 100644 --- a/src/widgets/itemviews/qitemdelegate.cpp +++ b/src/widgets/itemviews/qitemdelegate.cpp @@ -522,10 +522,6 @@ QWidget *QItemDelegate::createEditor(QWidget *parent, void QItemDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const { -#ifdef QT_NO_PROPERTIES - Q_UNUSED(editor); - Q_UNUSED(index); -#else QVariant v = index.data(Qt::EditRole); QByteArray n = editor->metaObject()->userProperty().name(); @@ -534,7 +530,6 @@ void QItemDelegate::setEditorData(QWidget *editor, const QModelIndex &index) con v = QVariant(editor->property(n).metaType()); editor->setProperty(n, v); } -#endif } /*! @@ -552,11 +547,6 @@ void QItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const { -#ifdef QT_NO_PROPERTIES - Q_UNUSED(model); - Q_UNUSED(editor); - Q_UNUSED(index); -#else Q_D(const QItemDelegate); Q_ASSERT(model); Q_ASSERT(editor); @@ -566,7 +556,6 @@ void QItemDelegate::setModelData(QWidget *editor, model->data(index, Qt::EditRole).userType()); if (!n.isEmpty()) model->setData(index, editor->property(n), Qt::EditRole); -#endif } /*! diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp index 975735eb15..ddf706c0e6 100644 --- a/src/widgets/itemviews/qstyleditemdelegate.cpp +++ b/src/widgets/itemviews/qstyleditemdelegate.cpp @@ -458,10 +458,6 @@ QWidget *QStyledItemDelegate::createEditor(QWidget *parent, */ void QStyledItemDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const { -#ifdef QT_NO_PROPERTIES - Q_UNUSED(editor); - Q_UNUSED(index); -#else QVariant v = index.data(Qt::EditRole); QByteArray n = editor->metaObject()->userProperty().name(); @@ -470,7 +466,6 @@ void QStyledItemDelegate::setEditorData(QWidget *editor, const QModelIndex &inde v = QVariant(editor->property(n).metaType()); editor->setProperty(n, v); } -#endif } /*! @@ -487,11 +482,6 @@ void QStyledItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const { -#ifdef QT_NO_PROPERTIES - Q_UNUSED(model); - Q_UNUSED(editor); - Q_UNUSED(index); -#else Q_D(const QStyledItemDelegate); Q_ASSERT(model); Q_ASSERT(editor); @@ -501,7 +491,6 @@ void QStyledItemDelegate::setModelData(QWidget *editor, model->data(index, Qt::EditRole).userType()); if (!n.isEmpty()) model->setData(index, editor->property(n), Qt::EditRole); -#endif } /*! -- cgit v1.2.3