diff options
author | Michael Goddard <michael.goddard@nokia.com> | 2010-11-03 05:45:43 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2011-02-08 12:33:57 (GMT) |
commit | e1161c6fd35249a938808d107cf5900cb07523ed (patch) | |
tree | 7ff2e3b6ac8d707f2f9e53a5fa88543d1d5b4104 | |
parent | 6b32028c08328328b118d5fc43a8ad2c1daa3b40 (diff) | |
download | Qt-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)
-rw-r--r-- | src/sql/models/qsqlquerymodel.cpp | 2 | ||||
-rw-r--r-- | src/sql/models/qsqltablemodel.cpp | 2 |
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() |