summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Goddard <michael.goddard@nokia.com>2010-11-03 05:45:43 (GMT)
committerMichael Goddard <michael.goddard@nokia.com>2011-02-04 05:41:02 (GMT)
commit741a5114c2c6bf4d89068d861db90c456cce371b (patch)
tree811bdc07b08ac39d82842c896e68fc571c081cdf /src
parent3bed865c35d8eb920ba5a68276fdf1690c834a64 (diff)
downloadQt-741a5114c2c6bf4d89068d861db90c456cce371b.zip
Qt-741a5114c2c6bf4d89068d861db90c456cce371b.tar.gz
Qt-741a5114c2c6bf4d89068d861db90c456cce371b.tar.bz2
Update some documentation about what happens with select()/setQuery().
Change-Id: I5f1afada766d40273526f2cd7537ad68d5f9d09a Task-number: QTBUG-12094 Reviewed-by: Charles Yin
Diffstat (limited to 'src')
-rw-r--r--src/sql/models/qsqlquerymodel.cpp2
-rw-r--r--src/sql/models/qsqltablemodel.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/sql/models/qsqlquerymodel.cpp b/src/sql/models/qsqlquerymodel.cpp
index 9800e67..fbc31ff 100644
--- a/src/sql/models/qsqlquerymodel.cpp
+++ b/src/sql/models/qsqlquerymodel.cpp
@@ -310,6 +310,8 @@ void QSqlQueryModel::queryChange()
lastError() can be used to retrieve verbose information if there
was an error setting the query.
+ \note Calling setQuery() will remove any inserted columns.
+
\sa query(), QSqlQuery::isActive(), QSqlQuery::setForwardOnly(), lastError()
*/
void QSqlQueryModel::setQuery(const QSqlQuery &query)
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index 61cd1d3..c6efbad 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -393,6 +393,8 @@ QString QSqlTableModel::tableName() const
specified filter and sort condition, and returns true if successful; otherwise
returns false.
+ \note Calling select() will revert any unsubmitted changes and remove any inserted columns.
+
\sa setTable(), setFilter(), selectStatement()
*/
bool QSqlTableModel::select()