summaryrefslogtreecommitdiffstats
path: root/examples/sql
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-07-01 22:09:14 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-07-08 09:01:42 +0900
commit81ade129093a279e6537db25710583fd2bba9427 (patch)
treea210834cbccc8aee2e9de7a8b7f41e1d31e2ced0 /examples/sql
parent35ced32e331ee29fda1642616c803637952f5b22 (diff)
downloadtqt-81ade129.tar.gz
tqt-81ade129.zip
Replace TRUE/FALSE with boolean values true/false - part 2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit c03a4800879ab62692e017e01c825ba12a421ad0)
Diffstat (limited to 'examples/sql')
-rw-r--r--examples/sql/blob/main.cpp2
-rw-r--r--examples/sql/overview/basicbrowsing/main.cpp2
-rw-r--r--examples/sql/overview/basicbrowsing2/main.cpp2
-rw-r--r--examples/sql/overview/basicdatamanip/main.cpp2
-rw-r--r--examples/sql/overview/connect1/main.cpp2
-rw-r--r--examples/sql/overview/connection.cpp6
-rw-r--r--examples/sql/overview/create_connections/main.cpp2
-rw-r--r--examples/sql/overview/custom1/main.cpp4
-rw-r--r--examples/sql/overview/delete/main.cpp2
-rw-r--r--examples/sql/overview/extract/main.cpp2
-rw-r--r--examples/sql/overview/form2/main.cpp4
-rw-r--r--examples/sql/overview/insert/main.cpp2
-rw-r--r--examples/sql/overview/insert2/main.cpp2
-rw-r--r--examples/sql/overview/navigating/main.cpp2
-rw-r--r--examples/sql/overview/order1/main.cpp2
-rw-r--r--examples/sql/overview/order2/main.cpp2
-rw-r--r--examples/sql/overview/retrieve1/main.cpp2
-rw-r--r--examples/sql/overview/subclass3/main.cpp2
-rw-r--r--examples/sql/overview/subclass4/main.cpp6
-rw-r--r--examples/sql/overview/subclass5/main.cpp6
-rw-r--r--examples/sql/overview/table1/main.cpp2
-rw-r--r--examples/sql/overview/table4/main.h2
-rw-r--r--examples/sql/overview/update/main.cpp2
-rw-r--r--examples/sql/sqltable/main.cpp2
24 files changed, 32 insertions, 32 deletions
diff --git a/examples/sql/blob/main.cpp b/examples/sql/blob/main.cpp
index 9bb9ea0c4..09f3a4c7a 100644
--- a/examples/sql/blob/main.cpp
+++ b/examples/sql/blob/main.cpp
@@ -22,7 +22,7 @@
int main( int argc, char ** argv )
{
- TQApplication a( argc, argv, FALSE );
+ TQApplication a( argc, argv, false );
TQSqlDatabase * db = TQSqlDatabase::addDatabase( DRIVER );
db->setDatabaseName( DATABASE );
db->setUserName( USER );
diff --git a/examples/sql/overview/basicbrowsing/main.cpp b/examples/sql/overview/basicbrowsing/main.cpp
index 9244d2a93..d0dce2017 100644
--- a/examples/sql/overview/basicbrowsing/main.cpp
+++ b/examples/sql/overview/basicbrowsing/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" );
diff --git a/examples/sql/overview/basicbrowsing2/main.cpp b/examples/sql/overview/basicbrowsing2/main.cpp
index 79b2b17db..0e4b60374 100644
--- a/examples/sql/overview/basicbrowsing2/main.cpp
+++ b/examples/sql/overview/basicbrowsing2/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" );
diff --git a/examples/sql/overview/basicdatamanip/main.cpp b/examples/sql/overview/basicdatamanip/main.cpp
index ed422afa7..7aabc4735 100644
--- a/examples/sql/overview/basicdatamanip/main.cpp
+++ b/examples/sql/overview/basicdatamanip/main.cpp
@@ -17,7 +17,7 @@ bool createConnections();
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
int rows = 0;
diff --git a/examples/sql/overview/connect1/main.cpp b/examples/sql/overview/connect1/main.cpp
index ea958e3ae..1177171ae 100644
--- a/examples/sql/overview/connect1/main.cpp
+++ b/examples/sql/overview/connect1/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
TQSqlDatabase *defaultDB = TQSqlDatabase::addDatabase( DB_SALES_DRIVER );
defaultDB->setDatabaseName( DB_SALES_DBNAME );
diff --git a/examples/sql/overview/connection.cpp b/examples/sql/overview/connection.cpp
index bb8654df1..7fc124956 100644
--- a/examples/sql/overview/connection.cpp
+++ b/examples/sql/overview/connection.cpp
@@ -19,7 +19,7 @@ bool createConnections()
defaultDB->setHostName( DB_SALES_HOST );
if ( ! defaultDB->open() ) {
tqWarning( "Failed to open sales database: " + defaultDB->lastError().text() );
- return FALSE;
+ return false;
}
TQSqlDatabase *oracle = TQSqlDatabase::addDatabase( DB_ORDERS_DRIVER, "ORACLE" );
@@ -29,7 +29,7 @@ bool createConnections()
oracle->setHostName( DB_ORDERS_HOST );
if ( ! oracle->open() ) {
tqWarning( "Failed to open orders database: " + oracle->lastError().text() );
- return FALSE;
+ return false;
}
TQSqlQuery q(TQString::null, defaultDB);
@@ -46,5 +46,5 @@ bool createConnections()
TQSqlQuery q2(TQString::null, oracle);
q2.exec("create table people (id integer primary key, name char(40))");
- return TRUE;
+ return true;
}
diff --git a/examples/sql/overview/create_connections/main.cpp b/examples/sql/overview/create_connections/main.cpp
index dc1042b7b..a85e1e915 100644
--- a/examples/sql/overview/create_connections/main.cpp
+++ b/examples/sql/overview/create_connections/main.cpp
@@ -13,7 +13,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
// Databases successfully opened; get pointers to them:
diff --git a/examples/sql/overview/custom1/main.cpp b/examples/sql/overview/custom1/main.cpp
index adde6e2e3..48c9fcbc0 100644
--- a/examples/sql/overview/custom1/main.cpp
+++ b/examples/sql/overview/custom1/main.cpp
@@ -60,8 +60,8 @@ FormDialog::FormDialog()
grid->activate();
staffCursor = new TQSqlCursor( "staff" );
- staffCursor->setTrimmed( "forename", TRUE );
- staffCursor->setTrimmed( "surname", TRUE );
+ staffCursor->setTrimmed( "forename", true );
+ staffCursor->setTrimmed( "surname", true );
idIndex = staffCursor->index( "id" );
staffCursor->select( idIndex );
staffCursor->first();
diff --git a/examples/sql/overview/delete/main.cpp b/examples/sql/overview/delete/main.cpp
index 9ade50bab..1bed71be8 100644
--- a/examples/sql/overview/delete/main.cpp
+++ b/examples/sql/overview/delete/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlCursor cur( "prices" );
diff --git a/examples/sql/overview/extract/main.cpp b/examples/sql/overview/extract/main.cpp
index 0c47911ce..51c7e2e80 100644
--- a/examples/sql/overview/extract/main.cpp
+++ b/examples/sql/overview/extract/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlCursor cur( "creditors" );
diff --git a/examples/sql/overview/form2/main.cpp b/examples/sql/overview/form2/main.cpp
index 115a27420..151cfbafe 100644
--- a/examples/sql/overview/form2/main.cpp
+++ b/examples/sql/overview/form2/main.cpp
@@ -12,8 +12,8 @@
FormDialog::FormDialog()
: staffCursor( "staff" )
{
- staffCursor.setTrimmed( "forename", TRUE );
- staffCursor.setTrimmed( "surname", TRUE );
+ staffCursor.setTrimmed( "forename", true );
+ staffCursor.setTrimmed( "surname", true );
TQLabel *forenameLabel = new TQLabel( "Forename:", this );
TQLineEdit *forenameEdit = new TQLineEdit( this );
diff --git a/examples/sql/overview/insert/main.cpp b/examples/sql/overview/insert/main.cpp
index 0f2c7b866..b43e4d9fa 100644
--- a/examples/sql/overview/insert/main.cpp
+++ b/examples/sql/overview/insert/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
int count = 0;
diff --git a/examples/sql/overview/insert2/main.cpp b/examples/sql/overview/insert2/main.cpp
index 5f5ee6620..2a40dd7ee 100644
--- a/examples/sql/overview/insert2/main.cpp
+++ b/examples/sql/overview/insert2/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlCursor cur( "prices" );
diff --git a/examples/sql/overview/navigating/main.cpp b/examples/sql/overview/navigating/main.cpp
index a2e773c1b..7885592e8 100644
--- a/examples/sql/overview/navigating/main.cpp
+++ b/examples/sql/overview/navigating/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlQuery query( "SELECT id, name FROM people ORDER BY name" );
diff --git a/examples/sql/overview/order1/main.cpp b/examples/sql/overview/order1/main.cpp
index 8c2c48df3..409888db6 100644
--- a/examples/sql/overview/order1/main.cpp
+++ b/examples/sql/overview/order1/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlCursor cur( "staff" );
diff --git a/examples/sql/overview/order2/main.cpp b/examples/sql/overview/order2/main.cpp
index 09c36151b..166b79a38 100644
--- a/examples/sql/overview/order2/main.cpp
+++ b/examples/sql/overview/order2/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlCursor cur( "staff" );
diff --git a/examples/sql/overview/retrieve1/main.cpp b/examples/sql/overview/retrieve1/main.cpp
index 768f870de..8693730ec 100644
--- a/examples/sql/overview/retrieve1/main.cpp
+++ b/examples/sql/overview/retrieve1/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlQuery query( "SELECT id, surname FROM staff" );
diff --git a/examples/sql/overview/subclass3/main.cpp b/examples/sql/overview/subclass3/main.cpp
index 7f6f7f567..170f2267f 100644
--- a/examples/sql/overview/subclass3/main.cpp
+++ b/examples/sql/overview/subclass3/main.cpp
@@ -15,7 +15,7 @@ InvoiceItemCursor::InvoiceItemCursor() :
{
TQSqlFieldInfo productName( "productname", TQVariant::String );
append( productName );
- setCalculated( productName.name(), TRUE );
+ setCalculated( productName.name(), true );
}
diff --git a/examples/sql/overview/subclass4/main.cpp b/examples/sql/overview/subclass4/main.cpp
index 0ea60afcb..4e4a6ba08 100644
--- a/examples/sql/overview/subclass4/main.cpp
+++ b/examples/sql/overview/subclass4/main.cpp
@@ -15,15 +15,15 @@ InvoiceItemCursor::InvoiceItemCursor() :
{
TQSqlFieldInfo productName( "productname", TQVariant::String );
append( productName );
- setCalculated( productName.name(), TRUE );
+ setCalculated( productName.name(), true );
TQSqlFieldInfo productPrice( "price", TQVariant::Double );
append( productPrice );
- setCalculated( productPrice.name(), TRUE );
+ setCalculated( productPrice.name(), true );
TQSqlFieldInfo productCost( "cost", TQVariant::Double );
append( productCost );
- setCalculated( productCost.name(), TRUE );
+ setCalculated( productCost.name(), true );
}
diff --git a/examples/sql/overview/subclass5/main.cpp b/examples/sql/overview/subclass5/main.cpp
index afb616f67..b4f3f743b 100644
--- a/examples/sql/overview/subclass5/main.cpp
+++ b/examples/sql/overview/subclass5/main.cpp
@@ -15,15 +15,15 @@ InvoiceItemCursor::InvoiceItemCursor() :
{
TQSqlFieldInfo productName( "productname", TQVariant::String );
append( productName );
- setCalculated( productName.name(), TRUE );
+ setCalculated( productName.name(), true );
TQSqlFieldInfo productPrice( "price", TQVariant::Double );
append( productPrice );
- setCalculated( productPrice.name(), TRUE );
+ setCalculated( productPrice.name(), true );
TQSqlFieldInfo productCost( "cost", TQVariant::Double );
append( productCost );
- setCalculated( productCost.name(), TRUE );
+ setCalculated( productCost.name(), true );
}
diff --git a/examples/sql/overview/table1/main.cpp b/examples/sql/overview/table1/main.cpp
index 118e73f6d..164e6500c 100644
--- a/examples/sql/overview/table1/main.cpp
+++ b/examples/sql/overview/table1/main.cpp
@@ -19,7 +19,7 @@ int main( int argc, char *argv[] )
if ( createConnections() ) {
TQSqlCursor staffCursor( "staff" );
- TQDataTable *staffTable = new TQDataTable( &staffCursor, TRUE );
+ TQDataTable *staffTable = new TQDataTable( &staffCursor, true );
app.setMainWidget( staffTable );
staffTable->refresh();
staffTable->show();
diff --git a/examples/sql/overview/table4/main.h b/examples/sql/overview/table4/main.h
index 394d34738..3be652963 100644
--- a/examples/sql/overview/table4/main.h
+++ b/examples/sql/overview/table4/main.h
@@ -36,7 +36,7 @@ class CustomTable : public TQDataTable
TQ_OBJECT
public:
CustomTable(
- TQSqlCursor *cursor, bool autoPopulate = FALSE,
+ TQSqlCursor *cursor, bool autoPopulate = false,
TQWidget * parent = 0, const char * name = 0 ) :
TQDataTable( cursor, autoPopulate, parent, name ) {}
void paintField(
diff --git a/examples/sql/overview/update/main.cpp b/examples/sql/overview/update/main.cpp
index 905e98107..8e199a7c0 100644
--- a/examples/sql/overview/update/main.cpp
+++ b/examples/sql/overview/update/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlCursor cur( "prices" );
diff --git a/examples/sql/sqltable/main.cpp b/examples/sql/sqltable/main.cpp
index 5af04d6c5..8de808b8d 100644
--- a/examples/sql/sqltable/main.cpp
+++ b/examples/sql/sqltable/main.cpp
@@ -61,7 +61,7 @@ int main( int argc, char ** argv )
TQDataTable table( &cursor ); /* data table uses our cursor */
table.addColumn( "name", "Name" );
table.addColumn( "address", "Address" );
- table.setSorting( TRUE );
+ table.setSorting( true );
a.setMainWidget( &table );
table.refresh(); /* load data */