summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Goddard <michael.goddard@nokia.com>2010-11-03 05:45:43 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-02-08 12:33:57 (GMT)
commite1161c6fd35249a938808d107cf5900cb07523ed (patch)
tree7ff2e3b6ac8d707f2f9e53a5fa88543d1d5b4104 /src
parent6b32028c08328328b118d5fc43a8ad2c1daa3b40 (diff)
downloadQt-e1161c6fd35249a938808d107cf5900cb07523ed.zip
Qt-e1161c6fd35249a938808d107cf5900cb07523ed.tar.gz
Qt-e1161c6fd35249a938808d107cf5900cb07523ed.tar.bz2
Update some documentation about what happens with select()/setQuery().
Change-Id: I5f1afada766d40273526f2cd7537ad68d5f9d09a Task-number: QTBUG-12094 Reviewed-by: Charles Yin (cherry picked from commit 741a5114c2c6bf4d89068d861db90c456cce371b)
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 1ad11c3..fbb442a 100644
--- a/src/sql/models/qsqlquerymodel.cpp
+++ b/src/sql/models/qsqlquerymodel.cpp
@@ -306,6 +306,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 532a134..764c879 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()