summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2013-10-02 16:51:05 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-08 00:46:27 +0200
commit4533cc994484a2308297e64e99af005fb4dca065 (patch)
treebc66283d11cdad100a1aec03f4e1d86bedc9a79e /src/sql
parent50dd0232b61d8ea3fb9aab18972c6e19678656e6 (diff)
Doc: Adding mark-up to boolean default values.
Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/doc/snippets/code/src_sql_kernel_qsqldatabase.cpp2
-rw-r--r--src/sql/doc/src/sql-programming.qdoc6
-rw-r--r--src/sql/kernel/qsqldatabase.cpp24
-rw-r--r--src/sql/kernel/qsqldriver.cpp20
-rw-r--r--src/sql/kernel/qsqlerror.cpp6
-rw-r--r--src/sql/kernel/qsqlfield.cpp20
-rw-r--r--src/sql/kernel/qsqlindex.cpp4
-rw-r--r--src/sql/kernel/qsqlquery.cpp50
-rw-r--r--src/sql/kernel/qsqlrecord.cpp32
-rw-r--r--src/sql/kernel/qsqlresult.cpp30
-rw-r--r--src/sql/models/qsqlquerymodel.cpp8
-rw-r--r--src/sql/models/qsqlrelationaltablemodel.cpp8
-rw-r--r--src/sql/models/qsqltablemodel.cpp42
13 files changed, 126 insertions, 126 deletions
diff --git a/src/sql/doc/snippets/code/src_sql_kernel_qsqldatabase.cpp b/src/sql/doc/snippets/code/src_sql_kernel_qsqldatabase.cpp
index 26ce7ab4ff..4643883bfe 100644
--- a/src/sql/doc/snippets/code/src_sql_kernel_qsqldatabase.cpp
+++ b/src/sql/doc/snippets/code/src_sql_kernel_qsqldatabase.cpp
@@ -128,7 +128,7 @@ QSqlDatabase db;
qDebug() << db.isValid(); // Returns false
db = QSqlDatabase::database("sales");
-qDebug() << db.isValid(); // Returns true if "sales" connection exists
+qDebug() << db.isValid(); // Returns \c true if "sales" connection exists
QSqlDatabase::removeDatabase("sales");
qDebug() << db.isValid(); // Returns false
diff --git a/src/sql/doc/src/sql-programming.qdoc b/src/sql/doc/src/sql-programming.qdoc
index 9a4f0eec75..33574bf8c2 100644
--- a/src/sql/doc/src/sql-programming.qdoc
+++ b/src/sql/doc/src/sql-programming.qdoc
@@ -152,7 +152,7 @@
After these connections have been initialized, \l{QSqlDatabase::}
{open()} for each one to establish the live connections. If the
- \l{QSqlDatabase::} {open()} fails, it returns false. In that case,
+ \l{QSqlDatabase::} {open()} fails, it returns \c false. In that case,
call QSqlDatabase::lastError() to get error information.
Once a connection is established, we can call the static function
@@ -199,7 +199,7 @@
above, we don't specify any connection, so the default connection
is used.
- If an error occurs, \l{QSqlQuery::exec()}{exec()} returns false.
+ If an error occurs, \l{QSqlQuery::exec()}{exec()} returns \c false.
The error is then available as QSqlQuery::lastError().
\section2 Navigating the Result Set
@@ -209,7 +209,7 @@
internal pointer is located one position \e{before} the first
record. We must call QSqlQuery::next() once to advance to the
first record, then \l{QSqlQuery::next()}{next()} again repeatedly
- to access the other records, until it returns false. Here's a
+ to access the other records, until it returns \c false. Here's a
typical loop that iterates over all the records in order:
\snippet sqldatabase/sqldatabase.cpp 32
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 0ca79fd39f..b87a1fe1c5 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -454,7 +454,7 @@ void QSqlDatabasePrivate::disable()
The database connection is referred to by \a connectionName. The
newly added database connection is returned.
- If \a type is not available or could not be loaded, isValid() returns false.
+ If \a type is not available or could not be loaded, isValid() returns \c false.
If \a connectionName is not specified, the new connection becomes
the default connection for the application, and subsequent calls
@@ -620,8 +620,8 @@ void QSqlDatabase::registerSqlDriver(const QString& name, QSqlDriverCreatorBase
/*!
\threadsafe
- Returns true if the list of database connections contains \a
- connectionName; otherwise returns false.
+ Returns \c true if the list of database connections contains \a
+ connectionName; otherwise returns \c false.
\sa connectionNames(), database(), {Threads and the SQL Module}
*/
@@ -826,7 +826,7 @@ QSqlQuery QSqlDatabase::exec(const QString & query) const
/*!
Opens the database connection using the current connection
- values. Returns true on success; otherwise returns false. Error
+ values. Returns \c true on success; otherwise returns \c false. Error
information can be retrieved using lastError().
\sa lastError(), setDatabaseName(), setUserName(), setPassword(),
@@ -843,7 +843,7 @@ bool QSqlDatabase::open()
\overload
Opens the database connection using the given \a user name and \a
- password. Returns true on success; otherwise returns false. Error
+ password. Returns \c true on success; otherwise returns \c false. Error
information can be retrieved using the lastError() function.
This function does not store the password it is given. Instead,
@@ -876,8 +876,8 @@ void QSqlDatabase::close()
}
/*!
- Returns true if the database connection is currently open;
- otherwise returns false.
+ Returns \c true if the database connection is currently open;
+ otherwise returns \c false.
*/
bool QSqlDatabase::isOpen() const
@@ -886,8 +886,8 @@ bool QSqlDatabase::isOpen() const
}
/*!
- Returns true if there was an error opening the database
- connection; otherwise returns false. Error information can be
+ Returns \c true if there was an error opening the database
+ connection; otherwise returns \c false. Error information can be
retrieved using the lastError() function.
*/
@@ -1302,8 +1302,8 @@ QString QSqlDatabase::connectOptions() const
}
/*!
- Returns true if a driver called \a name is available; otherwise
- returns false.
+ Returns \c true if a driver called \a name is available; otherwise
+ returns \c false.
\sa drivers()
*/
@@ -1418,7 +1418,7 @@ QSqlDatabase QSqlDatabase::addDatabase(QSqlDriver* driver, const QString& connec
}
/*!
- Returns true if the QSqlDatabase has a valid driver.
+ Returns \c true if the QSqlDatabase has a valid driver.
Example:
\snippet code/src_sql_kernel_qsqldatabase.cpp 8
diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp
index 63b90f27c6..36e886ed1f 100644
--- a/src/sql/kernel/qsqldriver.cpp
+++ b/src/sql/kernel/qsqldriver.cpp
@@ -159,7 +159,7 @@ QSqlDriver::~QSqlDriver()
*/
/*!
- Returns true if the database connection is open; otherwise returns
+ Returns \c true if the database connection is open; otherwise returns
false.
*/
@@ -169,8 +169,8 @@ bool QSqlDriver::isOpen() const
}
/*!
- Returns true if the there was an error opening the database
- connection; otherwise returns false.
+ Returns \c true if the there was an error opening the database
+ connection; otherwise returns \c false.
*/
bool QSqlDriver::isOpenError() const
@@ -247,8 +247,8 @@ bool QSqlDriver::isOpenError() const
/*!
\fn bool QSqlDriver::hasFeature(DriverFeature feature) const
- Returns true if the driver supports feature \a feature; otherwise
- returns false.
+ Returns \c true if the driver supports feature \a feature; otherwise
+ returns \c false.
Note that some databases need to be open() before this can be
determined.
@@ -273,7 +273,7 @@ void QSqlDriver::setOpen(bool open)
This function sets the open error state of the database to \a
error. Derived classes can use this function to report the status
of open(). Note that if \a error is true the open state of the
- database is set to closed (i.e., isOpen() returns false).
+ database is set to closed (i.e., isOpen() returns \c false).
\sa open(), setOpen()
*/
@@ -288,7 +288,7 @@ void QSqlDriver::setOpenError(bool error)
/*!
This function is called to begin a transaction. If successful,
return true, otherwise return false. The default implementation
- does nothing and returns false.
+ does nothing and returns \c false.
\sa commitTransaction(), rollbackTransaction()
*/
@@ -301,7 +301,7 @@ bool QSqlDriver::beginTransaction()
/*!
This function is called to commit a transaction. If successful,
return true, otherwise return false. The default implementation
- does nothing and returns false.
+ does nothing and returns \c false.
\sa beginTransaction(), rollbackTransaction()
*/
@@ -314,7 +314,7 @@ bool QSqlDriver::commitTransaction()
/*!
This function is called to rollback a transaction. If successful,
return true, otherwise return false. The default implementation
- does nothing and returns false.
+ does nothing and returns \c false.
\sa beginTransaction(), commitTransaction()
*/
@@ -779,7 +779,7 @@ QSql::NumericalPrecisionPolicy QSqlDriver::numericalPrecisionPolicy() const
\internal
Tries to cancel the running query, if the underlying driver has the
- capability to cancel queries. Returns true on success, otherwise false.
+ capability to cancel queries. Returns \c true on success, otherwise false.
This function can be called from a different thread.
diff --git a/src/sql/kernel/qsqlerror.cpp b/src/sql/kernel/qsqlerror.cpp
index 9beaf10a32..e4b8aa0c6d 100644
--- a/src/sql/kernel/qsqlerror.cpp
+++ b/src/sql/kernel/qsqlerror.cpp
@@ -116,7 +116,7 @@ QSqlError& QSqlError::operator=(const QSqlError& other)
}
/*!
- Compare the \a other error's values to this error and returns true, if it equal.
+ Compare the \a other error's values to this error and returns \c true, if it equal.
*/
bool QSqlError::operator==(const QSqlError& other) const
@@ -126,7 +126,7 @@ bool QSqlError::operator==(const QSqlError& other) const
/*!
- Compare the \a other error's values to this error and returns true if it is not equal.
+ Compare the \a other error's values to this error and returns \c true if it is not equal.
*/
bool QSqlError::operator!=(const QSqlError& other) const
@@ -278,7 +278,7 @@ QString QSqlError::text() const
}
/*!
- Returns true if an error is set, otherwise false.
+ Returns \c true if an error is set, otherwise false.
Example:
\snippet code/src_sql_kernel_qsqlerror.cpp 0
diff --git a/src/sql/kernel/qsqlfield.cpp b/src/sql/kernel/qsqlfield.cpp
index a0ce4068fc..c3c80cad61 100644
--- a/src/sql/kernel/qsqlfield.cpp
+++ b/src/sql/kernel/qsqlfield.cpp
@@ -190,12 +190,12 @@ QSqlField& QSqlField::operator=(const QSqlField& other)
/*! \fn bool QSqlField::operator!=(const QSqlField &other) const
- Returns true if the field is unequal to \a other; otherwise returns
+ Returns \c true if the field is unequal to \a other; otherwise returns
false.
*/
/*!
- Returns true if the field is equal to \a other; otherwise returns
+ Returns \c true if the field is equal to \a other; otherwise returns
false.
*/
bool QSqlField::operator==(const QSqlField& other) const
@@ -299,7 +299,7 @@ void QSqlField::setGenerated(bool gen)
/*!
Sets the value of the field to \a value. If the field is read-only
- (isReadOnly() returns true), nothing happens.
+ (isReadOnly() returns \c true), nothing happens.
If the data type of \a value differs from the field's current
data type, an attempt is made to cast it to the proper type. This
@@ -403,7 +403,7 @@ void QSqlField::setType(QVariant::Type type)
/*!
- Returns true if the field's value is read-only; otherwise returns
+ Returns \c true if the field's value is read-only; otherwise returns
false.
\sa setReadOnly(), type(), requiredStatus(), length(), precision(),
@@ -413,7 +413,7 @@ bool QSqlField::isReadOnly() const
{ return d->ro; }
/*!
- Returns true if the field's value is NULL; otherwise returns
+ Returns \c true if the field's value is NULL; otherwise returns
false.
\sa value()
@@ -429,7 +429,7 @@ void QSqlField::detach()
}
/*!
- Returns true if this is a required field; otherwise returns false.
+ Returns \c true if this is a required field; otherwise returns \c false.
An \c INSERT will fail if a required field does not have a value.
\sa setRequiredStatus(), type(), length(), precision(), defaultValue(),
@@ -494,7 +494,7 @@ int QSqlField::typeID() const
}
/*!
- Returns true if the field is generated; otherwise returns
+ Returns \c true if the field is generated; otherwise returns
false.
\sa setGenerated(), type(), requiredStatus(), length(), precision(),
@@ -506,8 +506,8 @@ bool QSqlField::isGenerated() const
}
/*!
- Returns true if the field's variant type is valid; otherwise
- returns false.
+ Returns \c true if the field's variant type is valid; otherwise
+ returns \c false.
*/
bool QSqlField::isValid() const
{
@@ -536,7 +536,7 @@ QDebug operator<<(QDebug dbg, const QSqlField &f)
#endif
/*!
- Returns true if the value is auto-generated by the database,
+ Returns \c true if the value is auto-generated by the database,
for example auto-increment primary key values.
\sa setAutoValue()
diff --git a/src/sql/kernel/qsqlindex.cpp b/src/sql/kernel/qsqlindex.cpp
index 9ca58ba358..4b8ec442e6 100644
--- a/src/sql/kernel/qsqlindex.cpp
+++ b/src/sql/kernel/qsqlindex.cpp
@@ -141,8 +141,8 @@ void QSqlIndex::append(const QSqlField& field, bool desc)
/*!
- Returns true if field \a i in the index is sorted in descending
- order; otherwise returns false.
+ Returns \c true if field \a i in the index is sorted in descending
+ order; otherwise returns \c false.
*/
bool QSqlIndex::isDescending(int i) const
diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp
index 5b103f1bff..661a582afe 100644
--- a/src/sql/kernel/qsqlquery.cpp
+++ b/src/sql/kernel/qsqlquery.cpp
@@ -114,11 +114,11 @@ QSqlQueryPrivate::~QSqlQueryPrivate()
standard SQL (e.g. \c{SET DATESTYLE=ISO} for PostgreSQL).
Successfully executed SQL statements set the query's state to
- active so that isActive() returns true. Otherwise the query's
+ active so that isActive() returns \c true. Otherwise the query's
state is set to inactive. In either case, when executing a new SQL
statement, the query is positioned on an invalid record. An active
query must be navigated to a valid record (so that isValid()
- returns true) before values can be retrieved.
+ returns \c true) before values can be retrieved.
For some databases, if an active query that is a \c{SELECT}
statement exists when you call \l{QSqlDatabase::}{commit()} or
@@ -309,7 +309,7 @@ QSqlQuery& QSqlQuery::operator=(const QSqlQuery& other)
}
/*!
- Returns true if the query is \l{isActive()}{active} and positioned
+ Returns \c true if the query is \l{isActive()}{active} and positioned
on a valid record and the \a field is NULL; otherwise returns
false. Note that for some drivers, isNull() will not return accurate
information until after an attempt is made to retrieve data.
@@ -326,9 +326,9 @@ bool QSqlQuery::isNull(int field) const
/*!
- Executes the SQL in \a query. Returns true and sets the query state
+ Executes the SQL in \a query. Returns \c true and sets the query state
to \l{isActive()}{active} if the query was successful; otherwise
- returns false. The \a query string must use syntax appropriate for
+ returns \c false. The \a query string must use syntax appropriate for
the SQL database being queried (for example, standard SQL).
After the query is executed, the query is positioned on an \e
@@ -339,7 +339,7 @@ bool QSqlQuery::isNull(int field) const
called.
For SQLite, the query string can contain only one statement at a time.
- If more than one statement is given, the function returns false.
+ If more than one statement is given, the function returns \c false.
Example:
@@ -686,7 +686,7 @@ bool QSqlQuery::previous()
positions the query on the retrieved record. Note that the result
must be in the \l{isActive()}{active} state and isSelect() must
return true before calling this function or it will do nothing and
- return false. Returns true if successful. If unsuccessful the query
+ return false. Returns \c true if successful. If unsuccessful the query
position is set to an invalid position and false is returned.
\sa next(), previous(), last(), seek(), at(), isActive(), isValid()
@@ -710,7 +710,7 @@ bool QSqlQuery::first()
the query on the retrieved record. Note that the result must be in
the \l{isActive()}{active} state and isSelect() must return true
before calling this function or it will do nothing and return false.
- Returns true if successful. If unsuccessful the query position is
+ Returns \c true if successful. If unsuccessful the query position is
set to an invalid position and false is returned.
\sa next(), previous(), first(), seek(), at(), isActive(), isValid()
@@ -729,8 +729,8 @@ bool QSqlQuery::last()
Returns the size of the result (number of rows returned), or -1 if
the size cannot be determined or if the database does not support
reporting information about query sizes. Note that for non-\c SELECT
- statements (isSelect() returns false), size() will return -1. If the
- query is not active (isActive() returns false), -1 is returned.
+ statements (isSelect() returns \c false), size() will return -1. If the
+ query is not active (isActive() returns \c false), -1 is returned.
To determine the number of rows affected by a non-\c SELECT
statement, use numRowsAffected().
@@ -773,8 +773,8 @@ QSqlError QSqlQuery::lastError() const
}
/*!
- Returns true if the query is currently positioned on a valid
- record; otherwise returns false.
+ Returns \c true if the query is currently positioned on a valid
+ record; otherwise returns \c false.
*/
bool QSqlQuery::isValid() const
@@ -784,7 +784,7 @@ bool QSqlQuery::isValid() const
/*!
- Returns true if the query is \e{active}. An active QSqlQuery is one
+ Returns \c true if the query is \e{active}. An active QSqlQuery is one
that has been \l{QSqlQuery::exec()} {exec()'d} successfully but not
yet finished with. When you are finished with an active query, you
can make the query inactive by calling finish() or clear(), or
@@ -805,8 +805,8 @@ bool QSqlQuery::isActive() const
}
/*!
- Returns true if the current query is a \c SELECT statement;
- otherwise returns false.
+ Returns \c true if the current query is a \c SELECT statement;
+ otherwise returns \c false.
*/
bool QSqlQuery::isSelect() const
@@ -815,8 +815,8 @@ bool QSqlQuery::isSelect() const
}
/*!
- Returns true if you can only scroll forward through a result set;
- otherwise returns false.
+ Returns \c true if you can only scroll forward through a result set;
+ otherwise returns \c false.
\sa setForwardOnly(), next()
*/
@@ -894,8 +894,8 @@ void QSqlQuery::clear()
}
/*!
- Prepares the SQL query \a query for execution. Returns true if the
- query is prepared successfully; otherwise returns false.
+ Prepares the SQL query \a query for execution. Returns \c true if the
+ query is prepared successfully; otherwise returns \c false.
The query may contain placeholders for binding values. Both Oracle
style colon-name (e.g., \c{:surname}), and ODBC style (\c{?})
@@ -909,7 +909,7 @@ void QSqlQuery::clear()
will fail.
For SQLite, the query string can contain only one statement at a time.
- If more than one statement is given, the function returns false.
+ If more than one statement is given, the function returns \c false.
Example:
@@ -949,8 +949,8 @@ bool QSqlQuery::prepare(const QString& query)
}
/*!
- Executes a previously prepared SQL query. Returns true if the query
- executed successfully; otherwise returns false.
+ Executes a previously prepared SQL query. Returns \c true if the query
+ executed successfully; otherwise returns \c false.
Note that the last error for this query is reset when exec() is
called.
@@ -981,8 +981,8 @@ bool QSqlQuery::exec()
support batch executions, the driver will simulate it using
conventional exec() calls.
- Returns true if the query is executed successfully; otherwise
- returns false.
+ Returns \c true if the query is executed successfully; otherwise
+ returns \c false.
Example:
@@ -1229,7 +1229,7 @@ void QSqlQuery::finish()
The query will be repositioned on an \e invalid record in the new
result set and must be navigated to a valid record before data
values can be retrieved. If a new result set isn't available the
- function returns false and the query is set to inactive. In any
+ function returns \c false and the query is set to inactive. In any
case the old result set will be discarded.
When one of the statements is a non-select statement a count of
diff --git a/src/sql/kernel/qsqlrecord.cpp b/src/sql/kernel/qsqlrecord.cpp
index 4cac5028c3..b01c20bd1a 100644
--- a/src/sql/kernel/qsqlrecord.cpp
+++ b/src/sql/kernel/qsqlrecord.cpp
@@ -167,15 +167,15 @@ QSqlRecord::~QSqlRecord()
/*!
\fn bool QSqlRecord::operator!=(const QSqlRecord &other) const
- Returns true if this object is not identical to \a other;
- otherwise returns false.
+ Returns \c true if this object is not identical to \a other;
+ otherwise returns \c false.
\sa operator==()
*/
/*!
- Returns true if this object is identical to \a other (i.e., has
- the same fields in the same order); otherwise returns false.
+ Returns \c true if this object is identical to \a other (i.e., has
+ the same fields in the same order); otherwise returns \c false.
\sa operator!=()
*/
@@ -329,8 +329,8 @@ void QSqlRecord::clear()
}
/*!
- Returns true if there are no fields in the record; otherwise
- returns false.
+ Returns \c true if there are no fields in the record; otherwise
+ returns \c false.
\sa append(), insert(), clear()
*/
@@ -342,8 +342,8 @@ bool QSqlRecord::isEmpty() const
/*!
- Returns true if there is a field in the record called \a name;
- otherwise returns false.
+ Returns \c true if there is a field in the record called \a name;
+ otherwise returns \c false.
*/
bool QSqlRecord::contains(const QString& name) const
@@ -399,8 +399,8 @@ void QSqlRecord::setGenerated(int index, bool generated)
/*!
\overload
- Returns true if the field \a index is null or if there is no field at
- position \a index; otherwise returns false.
+ Returns \c true if the field \a index is null or if there is no field at
+ position \a index; otherwise returns \c false.
*/
bool QSqlRecord::isNull(int index) const
{
@@ -408,8 +408,8 @@ bool QSqlRecord::isNull(int index) const
}
/*!
- Returns true if the field called \a name is null or if there is no
- field called \a name; otherwise returns false.
+ Returns \c true if the field called \a name is null or if there is no
+ field called \a name; otherwise returns \c false.
\sa setNull()
*/
@@ -445,8 +445,8 @@ void QSqlRecord::setNull(const QString& name)
/*!
- Returns true if the record has a field called \a name and this
- field is to be generated (the default); otherwise returns false.
+ Returns \c true if the record has a field called \a name and this
+ field is to be generated (the default); otherwise returns \c false.
\sa setGenerated()
*/
@@ -457,8 +457,8 @@ bool QSqlRecord::isGenerated(const QString& name) const
/*! \overload
- Returns true if the record has a field at position \a index and this
- field is to be generated (the default); otherwise returns false.
+ Returns \c true if the record has a field at position \a index and this
+ field is to be generated (the default); otherwise returns \c false.
\sa setGenerated()
*/
diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp
index e3203f983c..953e2ca66e 100644
--- a/src/sql/kernel/qsqlresult.cpp
+++ b/src/sql/kernel/qsqlresult.cpp
@@ -289,9 +289,9 @@ int QSqlResult::at() const
/*!
- Returns true if the result is positioned on a valid record (that
+ Returns \c true if the result is positioned on a valid record (that
is, the result is not positioned before the first or after the
- last record); otherwise returns false.
+ last record); otherwise returns \c false.
\sa at()
*/
@@ -305,13 +305,13 @@ bool QSqlResult::isValid() const
/*!
\fn bool QSqlResult::isNull(int index)
- Returns true if the field at position \a index in the current row
- is null; otherwise returns false.
+ Returns \c true if the field at position \a index in the current row
+ is null; otherwise returns \c false.
*/
/*!
- Returns true if the result has records to be retrieved; otherwise
- returns false.
+ Returns \c true if the result has records to be retrieved; otherwise
+ returns \c false.
*/
bool QSqlResult::isActive() const
@@ -350,8 +350,8 @@ void QSqlResult::setSelect(bool select)
}
/*!
- Returns true if the current result is from a \c SELECT statement;
- otherwise returns false.
+ Returns \c true if the current result is from a \c SELECT statement;
+ otherwise returns \c false.
\sa setSelect()
*/
@@ -538,8 +538,8 @@ bool QSqlResult::fetchPrevious()
}
/*!
- Returns true if you can only scroll forward through the result
- set; otherwise returns false.
+ Returns \c true if you can only scroll forward through the result
+ set; otherwise returns \c false.
\sa setForwardOnly()
*/
@@ -573,8 +573,8 @@ void QSqlResult::setForwardOnly(bool forward)
/*!
Prepares the given \a query, using the underlying database
- functionality where possible. Returns true if the query is
- prepared successfully; otherwise returns false.
+ functionality where possible. Returns \c true if the query is
+ prepared successfully; otherwise returns \c false.
Note: This method should have been called "safePrepare()".
@@ -602,7 +602,7 @@ bool QSqlResult::savePrepare(const QString& query)
/*!
Prepares the given \a query for execution; the query will normally
use placeholders so that it can be executed repeatedly. Returns
- true if the query is prepared successfully; otherwise returns false.
+ true if the query is prepared successfully; otherwise returns \c false.
\sa exec()
*/
@@ -860,8 +860,8 @@ QString QSqlResult::boundValueName(int index) const
}
/*!
- Returns true if at least one of the query's bound values is a \c
- QSql::Out or a QSql::InOut; otherwise returns false.
+ Returns \c true if at least one of the query's bound values is a \c
+ QSql::Out or a QSql::InOut; otherwise returns \c false.
\sa bindValueType()
*/
diff --git a/src/sql/models/qsqlquerymodel.cpp b/src/sql/models/qsqlquerymodel.cpp
index 00fc410ca5..4bee8fe326 100644
--- a/src/sql/models/qsqlquerymodel.cpp
+++ b/src/sql/models/qsqlquerymodel.cpp
@@ -200,7 +200,7 @@ void QSqlQueryModel::fetchMore(const QModelIndex &parent)
/*!
\since 4.1
- Returns true if it is possible to read more rows from the database.
+ Returns \c true if it is possible to read more rows from the database.
This only affects databases that don't report back the size of a query
(see QSqlDriver::hasFeature()).
@@ -493,7 +493,7 @@ void QSqlQueryModel::clear()
\a value. This is useful if the model is used to
display data in a view (e.g., QTableView).
- Returns true if \a orientation is Qt::Horizontal and
+ Returns \c true if \a orientation is Qt::Horizontal and
the \a section refers to a valid section; otherwise returns
false.
@@ -594,7 +594,7 @@ QSqlRecord QSqlQueryModel::record() const
\a parent parameter must always be an invalid QModelIndex, since
the model does not support parent-child relationships.
- Returns true if \a column is within bounds; otherwise returns false.
+ Returns \c true if \a column is within bounds; otherwise returns \c false.
By default, inserted columns are empty. To fill them with data,
reimplement data() and handle any inserted column separately:
@@ -636,7 +636,7 @@ bool QSqlQueryModel::insertColumns(int column, int count, const QModelIndex &par
Removing columns effectively hides them. It does not affect the
underlying QSqlQuery.
- Returns true if the columns were removed; otherwise returns false.
+ Returns \c true if the columns were removed; otherwise returns \c false.
*/
bool QSqlQueryModel::removeColumns(int column, int count, const QModelIndex &parent)
{
diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp
index fb45468d2e..6aeef89483 100644
--- a/src/sql/models/qsqlrelationaltablemodel.cpp
+++ b/src/sql/models/qsqlrelationaltablemodel.cpp
@@ -124,8 +124,8 @@ typedef QSqlRelationalTableModelSql Sql;
/*!
\fn bool QSqlRelation::isValid() const
- Returns true if the QSqlRelation object is valid; otherwise
- returns false.
+ Returns \c true if the QSqlRelation object is valid; otherwise
+ returns \c false.
*/
class QRelatedTableModel;
@@ -458,12 +458,12 @@ QVariant QSqlRelationalTableModel::data(const QModelIndex &index, int role) cons
value might be applied to the database at once, or it may be
cached in the model.
- Returns true if the value could be set, or false on error (for
+ Returns \c true if the value could be set, or false on error (for
example, if \a index is out of bounds).
For relational columns, \a value must be the index, not the
display value. The index must also exist in the referenced
- table, otherwise the function returns false.
+ table, otherwise the function returns \c false.
\sa editStrategy(), data(), submit(), revertRow()
*/
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index 94623548ed..da9b96a625 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -355,8 +355,8 @@ QString QSqlTableModel::tableName() const
/*!
Populates the model with data from the table that was set via setTable(), using the
- specified filter and sort condition, and returns true if successful; otherwise
- returns false.
+ specified filter and sort condition, and returns \c true if successful; otherwise
+ returns \c false.
\note Calling select() will revert any unsubmitted changes and remove any inserted columns.
@@ -393,7 +393,7 @@ bool QSqlTableModel::select()
on primary key values. Without a primary key, all column values must match. If
no matching row is found, the model will show an empty row.
- Returns true if successful; otherwise returns false.
+ Returns \c true if successful; otherwise returns \c false.
\sa select()
*/
@@ -500,7 +500,7 @@ QVariant QSqlTableModel::headerData(int section, Qt::Orientation orientation, in
\overload
\since 5.0
- Returns true if the model contains modified values that have not been
+ Returns \c true if the model contains modified values that have not been
committed to the datase, otherwise false.
*/
bool QSqlTableModel::isDirty() const
@@ -515,7 +515,7 @@ bool QSqlTableModel::isDirty() const
}
/*!
- Returns true if the value at the index \a index is dirty, otherwise false.
+ Returns \c true if the value at the index \a index is dirty, otherwise false.
Dirty values are values that were modified in the model
but not yet written into the database.
@@ -551,10 +551,10 @@ bool QSqlTableModel::isDirty(const QModelIndex &index) const
For OnRowChange, an index may receive a change only if no other
row has a cached change. Changes are not submitted automatically.
- Returns true if \a value is equal to the current value. However,
+ Returns \c true if \a value is equal to the current value. However,
the value will not be submitted to the database.
- Returns true if the value could be set or false on error, for
+ Returns \c true if the value could be set or false on error, for
example if \a index is out of bounds.
\sa editStrategy(), data(), submit(), submitAll(), revertRow()
@@ -609,8 +609,8 @@ void QSqlTableModel::setQuery(const QSqlQuery &query)
/*!
Updates the given \a row in the currently active database table
- with the specified \a values. Returns true if successful; otherwise
- returns false.
+ with the specified \a values. Returns \c true if successful; otherwise
+ returns \c false.
This is a low-level method that operates directly on the database
and should not be called directly. Use setData() to update values.
@@ -654,7 +654,7 @@ bool QSqlTableModel::updateRowInTable(int row, const QSqlRecord &values)
to insert values. The model will decide depending on its edit strategy
when to modify the database.
- Returns true if the values could be inserted, otherwise false.
+ Returns \c true if the values could be inserted, otherwise false.
Error information can be retrieved with \l lastError().
\sa lastError(), insertRow(), insertRows()
@@ -686,7 +686,7 @@ bool QSqlTableModel::insertRowIntoTable(const QSqlRecord &values)
to delete values. The model will decide depending on its edit strategy
when to modify the database.
- Returns true if the row was deleted; otherwise returns false.
+ Returns \c true if the row was deleted; otherwise returns \c false.
\sa removeRow(), removeRows()
*/
@@ -716,8 +716,8 @@ bool QSqlTableModel::deleteRowFromTable(int row)
}
/*!
- Submits all pending changes and returns true on success.
- Returns false on error, detailed error information can be
+ Submits all pending changes and returns \c true on success.
+ Returns \c false on error, detailed error information can be
obtained with lastError().
In OnManualSubmit, on success the model will be repopulated.
@@ -795,7 +795,7 @@ bool QSqlTableModel::submitAll()
Use submitAll() to submit all pending changes for the
OnManualSubmit strategy.
- Returns true on success; otherwise returns false. Use lastError()
+ Returns \c true on success; otherwise returns \c false. Use lastError()
to query detailed error information.
Does not automatically repopulate the model. Submitted rows are
@@ -1034,7 +1034,7 @@ QString QSqlTableModel::selectStatement() const
index \a column.
Returns if the columns were successfully removed; otherwise
- returns false.
+ returns \c false.
\sa removeRows()
*/
@@ -1073,8 +1073,8 @@ bool QSqlTableModel::removeColumns(int column, int count, const QModelIndex &par
signal is emitted.
If row < 0 or row + count > rowCount(), no action is taken and
- false is returned. Returns true if all rows could be removed;
- otherwise returns false. Detailed database error information
+ false is returned. Returns \c true if all rows could be removed;
+ otherwise returns \c false. Detailed database error information
can be retrieved using lastError().
\sa removeColumns(), insertRows()
@@ -1131,8 +1131,8 @@ bool QSqlTableModel::removeRows(int row, int count, const QModelIndex &parent)
Does not submit rows, regardless of edit strategy.
- Returns false if the parameters are out of bounds or the row cannot be
- inserted; otherwise returns true.
+ Returns \c false if the parameters are out of bounds or the row cannot be
+ inserted; otherwise returns \c true.
\sa primeInsert(), insertRecord()
*/
@@ -1178,7 +1178,7 @@ bool QSqlTableModel::insertRows(int row, int count, const QModelIndex &parent)
the record will be appended to the end. Calls insertRows() and
setRecord() internally.
- Returns true if the record could be inserted, otherwise false.
+ Returns \c true if the record could be inserted, otherwise false.
Changes are submitted immediately for OnFieldChange and
OnRowChange. Failure does not leave a new row in the model.
@@ -1360,7 +1360,7 @@ QSqlRecord QSqlTableModel::record(int row) const
Changes are submitted immediately. Submitted changes are not
reverted upon failure.
- Returns true if all the values could be set; otherwise returns
+ Returns \c true if all the values could be set; otherwise returns
false.
\sa record(), editStrategy()