summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers/cache
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/drivers/cache
parent771af909e74927126fba90ec6e0298dc68d5bf4f (diff)
downloadtqt-master.tar.gz
tqt-master.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/drivers/cache')
-rw-r--r--src/sql/drivers/cache/tqsqlcachedresult.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/sql/drivers/cache/tqsqlcachedresult.cpp b/src/sql/drivers/cache/tqsqlcachedresult.cpp
index 709e61944..b22c56b28 100644
--- a/src/sql/drivers/cache/tqsqlcachedresult.cpp
+++ b/src/sql/drivers/cache/tqsqlcachedresult.cpp
@@ -61,7 +61,7 @@ public:
};
TQtSqlCachedResultPrivate::TQtSqlCachedResultPrivate():
- cache(0), current(0), rowCacheEnd(0), colCount(0), forwardOnly(FALSE)
+ cache(0), current(0), rowCacheEnd(0), colCount(0), forwardOnly(false)
{
}
@@ -76,7 +76,7 @@ void TQtSqlCachedResultPrivate::cleanup()
if (forwardOnly)
delete current;
current = 0;
- forwardOnly = FALSE;
+ forwardOnly = false;
colCount = 0;
rowCacheEnd = 0;
}
@@ -108,11 +108,11 @@ TQtSqlCachedResult::RowCache *TQtSqlCachedResultPrivate::next()
bool TQtSqlCachedResultPrivate::seek(int i)
{
if (forwardOnly || i < 0)
- return FALSE;
+ return false;
if (i >= rowCacheEnd)
- return FALSE;
+ return false;
current = (*cache)[i];
- return TRUE;
+ return true;
}
void TQtSqlCachedResultPrivate::revertLast()
@@ -144,40 +144,40 @@ void TQtSqlCachedResult::init(int colCount)
bool TQtSqlCachedResult::fetch(int i)
{
if ((!isActive()) || (i < 0))
- return FALSE;
+ return false;
if (at() == i)
- return TRUE;
+ return true;
if (d->forwardOnly) {
// speed hack - do not copy values if not needed
if (at() > i || at() == TQSql::AfterLast)
- return FALSE;
+ return false;
while(at() < i - 1) {
if (!gotoNext(0))
- return FALSE;
+ return false;
setAt(at() + 1);
}
if (!gotoNext(d->current))
- return FALSE;
+ return false;
setAt(at() + 1);
- return TRUE;
+ return true;
}
if (d->seek(i)) {
setAt(i);
- return TRUE;
+ return true;
}
setAt(d->rowCacheEnd - 1);
while (at() < i) {
if (!cacheNext())
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
bool TQtSqlCachedResult::fetchNext()
{
if (d->seek(at() + 1)) {
setAt(at() + 1);
- return TRUE;
+ return true;
}
return cacheNext();
}
@@ -190,11 +190,11 @@ bool TQtSqlCachedResult::fetchPrev()
bool TQtSqlCachedResult::fetchFirst()
{
if (d->forwardOnly && at() != TQSql::BeforeFirst) {
- return FALSE;
+ return false;
}
if (d->seek(0)) {
setAt(0);
- return TRUE;
+ return true;
}
return cacheNext();
}
@@ -203,7 +203,7 @@ bool TQtSqlCachedResult::fetchLast()
{
if (at() == TQSql::AfterLast) {
if (d->forwardOnly)
- return FALSE;
+ return false;
else
return fetch(d->rowCacheEnd - 1);
}
@@ -213,7 +213,7 @@ bool TQtSqlCachedResult::fetchLast()
i++; /* brute force */
if (d->forwardOnly && at() == TQSql::AfterLast) {
setAt(i);
- return TRUE;
+ return true;
} else {
return fetch(d->rowCacheEnd - 1);
}
@@ -230,7 +230,7 @@ TQVariant TQtSqlCachedResult::data(int i)
bool TQtSqlCachedResult::isNull(int i)
{
if (!d->current || i >= (int)d->current->size() || i < 0)
- return TRUE;
+ return true;
return (*d->current)[i].isNull();
}
@@ -238,7 +238,7 @@ bool TQtSqlCachedResult::isNull(int i)
void TQtSqlCachedResult::cleanup()
{
setAt(TQSql::BeforeFirst);
- setActive(FALSE);
+ setActive(false);
d->cleanup();
}
@@ -246,10 +246,10 @@ bool TQtSqlCachedResult::cacheNext()
{
if (!gotoNext(d->next())) {
d->revertLast();
- return FALSE;
+ return false;
}
setAt(at() + 1);
- return TRUE;
+ return true;
}
int TQtSqlCachedResult::colCount() const