summaryrefslogtreecommitdiffstats
path: root/src/sql/models/qsqlquerymodel.h
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2017-05-18 15:26:12 +0200
committerJesus Fernandez <Jesus.Fernandez@qt.io>2017-05-26 18:16:04 +0000
commit40206a9f6d7635bb19305d1c8d74908808e3529e (patch)
tree545f97f07b12f98b211f20d660c34f74fa3b6cf4 /src/sql/models/qsqlquerymodel.h
parent9609e2945cf72a92d0966692a08291da242dce60 (diff)
Modify QSqlQueryModel roleNames
QSqlQueryModel::roleNames was exposing the default QAbstractItemModel roles. Only "display" role makes sense because it's a read-only model and it is not providing any other data information. [ChangeLog][Important Behavior Changes] The names of the roles returned by QSqlQueryModel::roleNames now only include a name for the Qt::DisplayRole. Previously all the roles names of QSqlQueryModel were returned. Task-number: QTBUG-60857 Change-Id: Ib18aa0e7083a828648767d700c5af05b6aa84f4f Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/sql/models/qsqlquerymodel.h')
-rw-r--r--src/sql/models/qsqlquerymodel.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sql/models/qsqlquerymodel.h b/src/sql/models/qsqlquerymodel.h
index f786f71300..b773b90475 100644
--- a/src/sql/models/qsqlquerymodel.h
+++ b/src/sql/models/qsqlquerymodel.h
@@ -86,6 +86,8 @@ public:
void fetchMore(const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE;
bool canFetchMore(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
+ QHash<int, QByteArray> roleNames() const override;
+
protected:
void beginInsertRows(const QModelIndex &parent, int first, int last);
void endInsertRows();