summaryrefslogtreecommitdiffstats
path: root/src/sql/models
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-01-28 01:00:09 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2020-01-28 08:09:51 +0100
commit082faeff9c4c5a5b10d140b391d30305575a898b (patch)
tree505d176f243bfa3785a8aeb13138d3eba476175b /src/sql/models
parentbe8c257da9a264994243c120231965ff0008ef09 (diff)
parent1ed802e3b8a7f236bd277719090f461a87eae78e (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: src/gui/image/qpnghandler.cpp Change-Id: I8630f363457bb613d8fb88470a71d95d97cdb301
Diffstat (limited to 'src/sql/models')
-rw-r--r--src/sql/models/qsqlquerymodel.cpp4
-rw-r--r--src/sql/models/qsqltablemodel.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/sql/models/qsqlquerymodel.cpp b/src/sql/models/qsqlquerymodel.cpp
index c0b1061c6b..31d0ec985d 100644
--- a/src/sql/models/qsqlquerymodel.cpp
+++ b/src/sql/models/qsqlquerymodel.cpp
@@ -124,8 +124,8 @@ int QSqlQueryModelPrivate::columnInQuery(int modelColumn) const
\snippet sqldatabase/sqldatabase.cpp 21
The code snippet above extracts the \c salary field from record 4 in
- the result set of the query \c{SELECT * from employee}. Assuming
- that \c salary is column 2, we can rewrite the last line as follows:
+ the result set of the \c SELECT query. Since \c salary is the 2nd
+ column (or column index 1), we can rewrite the last line as follows:
\snippet sqldatabase/sqldatabase.cpp 22
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index 4b29492134..7d2421d34e 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -222,7 +222,7 @@ bool QSqlTableModelPrivate::exec(const QString &stmt, bool prepStatement,
QSqlTableModel can also be used to access a database
programmatically, without binding it to a view:
- \snippet sqldatabase/sqldatabase.cpp 21
+ \snippet sqldatabase/sqldatabase.cpp 25
The code snippet above extracts the \c salary field from record 4 in
the result set of the query \c{SELECT * from employee}.