From dc6a1d186eb2060f549ef55b74711b54ed66ade7 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 21 Mar 2012 20:42:50 +0100 Subject: Remove workaround for QComboBox not having a USER property. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QComboBox does in fact have a user property since b1b87a73012342dc1619a8e907ea9954d59ca564. Change-Id: I24eb2ef267cec5d8a9f7348954b703fa6df04fa5 Reviewed-by: Girish Ramakrishnan Reviewed-by: Thorbjørn Lund Martsum Reviewed-by: David Faure --- src/widgets/itemviews/qitemdelegate.cpp | 4 ---- src/widgets/itemviews/qstyleditemdelegate.cpp | 4 ---- 2 files changed, 8 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/itemviews/qitemdelegate.cpp b/src/widgets/itemviews/qitemdelegate.cpp index 6c62378009..bd9f4510f7 100644 --- a/src/widgets/itemviews/qitemdelegate.cpp +++ b/src/widgets/itemviews/qitemdelegate.cpp @@ -551,13 +551,9 @@ void QItemDelegate::setEditorData(QWidget *editor, const QModelIndex &index) con 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: 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); diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp index b27dcb0a7b..119692531f 100644 --- a/src/widgets/itemviews/qstyleditemdelegate.cpp +++ b/src/widgets/itemviews/qstyleditemdelegate.cpp @@ -488,13 +488,9 @@ void QStyledItemDelegate::setEditorData(QWidget *editor, const QModelIndex &inde Q_UNUSED(editor); Q_UNUSED(index); #else - Q_D(const QStyledItemDelegate); QVariant v = index.data(Qt::EditRole); QByteArray n = editor->metaObject()->userProperty().name(); - // ### 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); -- cgit v1.2.3