summaryrefslogtreecommitdiffstats
path: root/src/sql/models/qsqltablemodel.h
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2012-07-11 16:29:53 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-17 08:13:42 +0200
commitfbf010a26617b3986e9a76bd9c004403aebfcdc2 (patch)
tree3cf064af63bfd9014192890153fd052c4a3a567f /src/sql/models/qsqltablemodel.h
parent76880aa2c43946103c4ad2babe45eb71e1ab4f74 (diff)
QSqlTM: add reimplemented record() method
QSqlQueryModel::record(row) populates the record it returns with values from virtual data(), so the values themselves can be supplied by QSqlTableModel. However, it is also desirable to be able to interrogate QSqlTableModel for the actual current record in its cache, including properties such as the generated flag. Change-Id: I733901913b7d237d5762448e953a99b5bd83fc7f Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Diffstat (limited to 'src/sql/models/qsqltablemodel.h')
-rw-r--r--src/sql/models/qsqltablemodel.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sql/models/qsqltablemodel.h b/src/sql/models/qsqltablemodel.h
index 62e09869c9..0cdab4babf 100644
--- a/src/sql/models/qsqltablemodel.h
+++ b/src/sql/models/qsqltablemodel.h
@@ -74,6 +74,8 @@ public:
Qt::ItemFlags flags(const QModelIndex &index) const;
+ QSqlRecord record() const;
+ QSqlRecord record(int row) const;
QVariant data(const QModelIndex &idx, int role = Qt::DisplayRole) const;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);