summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2012-02-15 01:31:07 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-23 23:43:53 +0100
commit3d763dc83adce6fc270c17933fd66ae5c539517c (patch)
tree49cb7463c84ca5fe59640bff65cb9de8f61b8198 /src
parent3a863280dc7f1845bf3daa74fe235b1df9bc26ae (diff)
QSqlTableModel: rename parameter to avoid name clash with method
Change-Id: Ib8fa6b0ca71ffdd9f1f8416c448b5c830988ed08 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src')
-rw-r--r--src/sql/models/qsqltablemodel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index 0cb7c3921b..c895c39212 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -1221,7 +1221,7 @@ Qt::ItemFlags QSqlTableModel::flags(const QModelIndex &index) const
\sa record(), editStrategy()
*/
-bool QSqlTableModel::setRecord(int row, const QSqlRecord &record)
+bool QSqlTableModel::setRecord(int row, const QSqlRecord &values)
{
Q_D(QSqlTableModel);
Q_ASSERT_X(row >= 0, "QSqlTableModel::setRecord()", "Cannot set a record to a row less than 0");
@@ -1239,9 +1239,9 @@ bool QSqlTableModel::setRecord(int row, const QSqlRecord &record)
// Check field names and remember mapping
typedef QMap<int, int> Map;
Map map;
- for (int i = 0; i < record.count(); ++i) {
- if (record.isGenerated(i)) {
- int idx = d->nameToIndex(record.fieldName(i));
+ for (int i = 0; i < values.count(); ++i) {
+ if (values.isGenerated(i)) {
+ int idx = d->nameToIndex(values.fieldName(i));
if (idx == -1)
return false;
map[i] = idx;
@@ -1256,7 +1256,7 @@ bool QSqlTableModel::setRecord(int row, const QSqlRecord &record)
Map::const_iterator i = map.constBegin();
const Map::const_iterator e = map.constEnd();
for ( ; i != e; ++i)
- mrow.setValue(i.value(), record.value(i.key()));
+ mrow.setValue(i.value(), values.value(i.key()));
if (columnCount())
emit dataChanged(createIndex(row, 0), createIndex(row, columnCount() - 1));