summaryrefslogtreecommitdiffstats
path: root/src/sql/models/qsqlrelationaldelegate.h
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2012-10-13 22:21:00 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-26 18:57:54 +0200
commit5ca03eddd372c00714d11211caae4c7b7959cfd4 (patch)
treefdf6ca3056ce27f1e5d38a317bdf93470e5c6585 /src/sql/models/qsqlrelationaldelegate.h
parentbb8c83986f9ebfb324210a08aea7b182c3afa219 (diff)
QSqlRelationalDelegate: remove setEditorData reimplementation
Since commit 84787d82ee9369b2a83c5b0568ee62ab602a5528 QItemDelegate::setEditorData() works out of the box on QComboBox. Change-Id: Ic9839f7eccccbdb787ce204fe98311335ee16b92 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/sql/models/qsqlrelationaldelegate.h')
-rw-r--r--src/sql/models/qsqlrelationaldelegate.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/sql/models/qsqlrelationaldelegate.h b/src/sql/models/qsqlrelationaldelegate.h
index 439dde2662..52a19dbb0a 100644
--- a/src/sql/models/qsqlrelationaldelegate.h
+++ b/src/sql/models/qsqlrelationaldelegate.h
@@ -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())