QSqlRelationalDelegate: remove setEditorData reimplementation

Since commit 84787d82ee
QItemDelegate::setEditorData() works out of the box
on QComboBox.

Change-Id: Ic9839f7eccccbdb787ce204fe98311335ee16b92
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
bb10
Mark Brand 2012-10-13 22:21:00 +02:00 committed by The Qt Project
parent bb8c83986f
commit 5ca03eddd3
1 changed files with 0 additions and 11 deletions

View File

@ -82,17 +82,6 @@ QWidget *createEditor(QWidget *aParent,
return combo;
}
void setEditorData(QWidget *editor, const QModelIndex &index) const
{
const QSqlRelationalTableModel *sqlModel = qobject_cast<const QSqlRelationalTableModel *>(index.model());
QComboBox *combo = qobject_cast<QComboBox *>(editor);
if (!sqlModel || !combo) {
QItemDelegate::setEditorData(editor, index);
return;
}
combo->setCurrentIndex(combo->findText(sqlModel->data(index).toString()));
}
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
{
if (!index.isValid())