summaryrefslogtreecommitdiffstats
path: root/src/sql/tqsqlresult.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-12-06 17:33:43 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-12-07 11:57:25 +0900
commit5a863a8932d14b99c5f838c4efa1618070d71b29 (patch)
tree000bd50b5c488635f9663b16b7fbfe5380435a04 /src/sql/tqsqlresult.cpp
parent771af909e74927126fba90ec6e0298dc68d5bf4f (diff)
downloadtqt-5a863a8932d14b99c5f838c4efa1618070d71b29.tar.gz
tqt-5a863a8932d14b99c5f838c4efa1618070d71b29.zip
Replace TRUE/FALSE with boolean values true/false - part 7HEADmaster
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/sql/tqsqlresult.cpp')
-rw-r--r--src/sql/tqsqlresult.cpp51
1 files changed, 25 insertions, 26 deletions
diff --git a/src/sql/tqsqlresult.cpp b/src/sql/tqsqlresult.cpp
index 05559290e..fc32b46d3 100644
--- a/src/sql/tqsqlresult.cpp
+++ b/src/sql/tqsqlresult.cpp
@@ -76,13 +76,13 @@ public:
db. The object is initialized to an inactive state.
*/
-TQSqlResult::TQSqlResult( const TQSqlDriver * db ): forwardOnly( FALSE )
+TQSqlResult::TQSqlResult( const TQSqlDriver * db ): forwardOnly( false )
{
d = new TQSqlResultPrivate();
d->sqldriver = db;
d->idx = TQSql::BeforeFirst;
- d->isSel = FALSE;
- d->active = FALSE;
+ d->isSel = false;
+ d->active = false;
d->ext = new TQSqlExtension();
}
@@ -127,28 +127,27 @@ int TQSqlResult::at() const
/*!
- Returns TRUE if the result is positioned on a valid record (that
+ Returns 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 false.
*/
bool TQSqlResult::isValid() const
{
- return ( d->idx != TQSql::BeforeFirst && \
- d->idx != TQSql::AfterLast ) ? TRUE : FALSE;
+ return (d->idx != TQSql::BeforeFirst && d->idx != TQSql::AfterLast);
}
/*!
\fn bool TQSqlResult::isNull( int i )
- Returns TRUE if the field at position \a i is NULL; otherwise
- returns FALSE.
+ Returns true if the field at position \a i is NULL; otherwise
+ returns false.
*/
/*!
- Returns TRUE if the result has records to be retrieved; otherwise
- returns FALSE.
+ Returns true if the result has records to be retrieved; otherwise
+ returns false.
*/
bool TQSqlResult::isActive() const
@@ -172,8 +171,8 @@ void TQSqlResult::setAt( int at )
/*!
Protected function provided for derived classes to indicate
whether or not the current statement is a SQL SELECT statement.
- The \a s parameter should be TRUE if the statement is a SELECT
- statement, or FALSE otherwise.
+ The \a s parameter should be true if the statement is a SELECT
+ statement, or false otherwise.
*/
void TQSqlResult::setSelect( bool s )
@@ -182,8 +181,8 @@ void TQSqlResult::setSelect( bool s )
}
/*!
- Returns TRUE if the current result is from a SELECT statement;
- otherwise returns FALSE.
+ Returns true if the current result is from a SELECT statement;
+ otherwise returns false.
*/
bool TQSqlResult::isSelect() const
@@ -265,8 +264,8 @@ TQSqlError TQSqlResult::lastError() const
apply the \a query to the database. This function is called only
after the result is set to an inactive state and is positioned
before the first record of the new result. Derived classes should
- return TRUE if the query was successful and ready to be used,
- or FALSE otherwise.
+ return true if the query was successful and ready to be used,
+ or false otherwise.
*/
/*!
@@ -275,8 +274,8 @@ TQSqlError TQSqlResult::lastError() const
Positions the result to an arbitrary (zero-based) index \a i. This
function is only called if the result is in an active state. Derived
classes must reimplement this function and position the result to the
- index \a i, and call setAt() with an appropriate value. Return TRUE
- to indicate success, or FALSE to signify failure.
+ index \a i, and call setAt() with an appropriate value. Return true
+ to indicate success, or false to signify failure.
*/
/*!
@@ -286,7 +285,7 @@ TQSqlError TQSqlResult::lastError() const
function is only called if the result is in an active state.
Derived classes must reimplement this function and position the result
to the first record, and call setAt() with an appropriate value.
- Return TRUE to indicate success, or FALSE to signify failure.
+ Return true to indicate success, or false to signify failure.
*/
/*!
@@ -296,7 +295,7 @@ TQSqlError TQSqlResult::lastError() const
function is only called if the result is in an active state.
Derived classes must reimplement this function and position the result
to the last record, and call setAt() with an appropriate value.
- Return TRUE to indicate success, or FALSE to signify failure.
+ Return true to indicate success, or false to signify failure.
*/
/*!
@@ -305,7 +304,7 @@ TQSqlError TQSqlResult::lastError() const
The default implementation calls fetch() with the next index.
Derived classes can reimplement this function and position the result
to the next record in some other way, and call setAt() with an
- appropriate value. Return TRUE to indicate success, or FALSE to
+ appropriate value. Return true to indicate success, or false to
signify failure.
*/
@@ -320,7 +319,7 @@ bool TQSqlResult::fetchNext()
state. The default implementation calls fetch() with the previous
index. Derived classes can reimplement this function and position the
result to the next record in some other way, and call setAt() with
- an appropriate value. Return TRUE to indicate success, or FALSE to
+ an appropriate value. Return true to indicate success, or false to
signify failure.
*/
@@ -330,8 +329,8 @@ bool TQSqlResult::fetchPrev()
}
/*!
- Returns TRUE if you can only scroll forward through a result set;
- otherwise returns FALSE.
+ Returns true if you can only scroll forward through a result set;
+ otherwise returns false.
*/
bool TQSqlResult::isForwardOnly() const
{
@@ -339,7 +338,7 @@ bool TQSqlResult::isForwardOnly() const
}
/*!
- Sets forward only mode to \a forward. If forward is TRUE only
+ Sets forward only mode to \a forward. If forward is true only
fetchNext() is allowed for navigating the results. Forward only
mode needs far less memory since results do not have to be cached.
forward only mode is off by default.