summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.cpp6
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.cpp26
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp42
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp38
-rw-r--r--src/sql/qdatatable.cpp14
-rw-r--r--src/sql/qsqlcursor.cpp6
-rw-r--r--src/sql/qsqldatabase.cpp12
-rw-r--r--src/sql/qsqldriver.cpp12
-rw-r--r--src/sql/qsqlfield.cpp2
-rw-r--r--src/sql/qsqlindex.cpp2
-rw-r--r--src/sql/qsqlmanager_p.cpp18
-rw-r--r--src/sql/qsqlpropertymap.cpp4
-rw-r--r--src/sql/qsqlquery.cpp28
-rw-r--r--src/sql/qsqlrecord.cpp6
14 files changed, 108 insertions, 108 deletions
diff --git a/src/sql/drivers/ibase/qsql_ibase.cpp b/src/sql/drivers/ibase/qsql_ibase.cpp
index f6aff5dbb..59d9f89a5 100644
--- a/src/sql/drivers/ibase/qsql_ibase.cpp
+++ b/src/sql/drivers/ibase/qsql_ibase.cpp
@@ -411,7 +411,7 @@ TQIBaseResult::~TQIBaseResult()
bool TQIBaseResult::prepare(const TQString& query)
{
- //qDebug("prepare: %s", query.ascii());
+ //tqDebug("prepare: %s", query.ascii());
if (!driver() || !driver()->isOpen() || driver()->isOpenError())
return FALSE;
d->cleanup();
@@ -471,7 +471,7 @@ bool TQIBaseResult::exec()
if (d->inda && extension()->index.count() > 0) {
TQMap<int, TQString>::ConstIterator it;
if ((int)extension()->index.count() > d->inda->sqld) {
- qWarning("TQIBaseResult::exec: Parameter mismatch, expected %d, got %d parameters", d->inda->sqld, extension()->index.count());
+ tqWarning("TQIBaseResult::exec: Parameter mismatch, expected %d, got %d parameters", d->inda->sqld, extension()->index.count());
return FALSE;
}
int para = 0;
@@ -560,7 +560,7 @@ bool TQIBaseResult::exec()
bool TQIBaseResult::reset (const TQString& query)
{
-// qDebug("reset: %s", query.ascii());
+// tqDebug("reset: %s", query.ascii());
if (!driver() || !driver()->isOpen() || driver()->isOpenError())
return FALSE;
d->cleanup();
diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp
index d34e58500..aca83545f 100644
--- a/src/sql/drivers/mysql/qsql_mysql.cpp
+++ b/src/sql/drivers/mysql/qsql_mysql.cpp
@@ -53,7 +53,7 @@
# define Q_NO_MYSQL_EMBEDDED
#endif
-TQPtrDict<TQSqlOpenExtension> *qSqlOpenExtDict();
+TQPtrDict<TQSqlOpenExtension> *tqSqlOpenExtDict();
static int qMySqlConnectionCount = 0;
static bool qMySqlInitHandledByUser = FALSE;
@@ -237,7 +237,7 @@ bool TQMYSQLResult::fetchFirst()
TQVariant TQMYSQLResult::data( int field )
{
if ( !isSelect() || field >= (int) d->fieldTypes.count() ) {
- qWarning( "TQMYSQLResult::data: column %d out of range", field );
+ tqWarning( "TQMYSQLResult::data: column %d out of range", field );
return TQVariant();
}
@@ -284,7 +284,7 @@ TQVariant TQMYSQLResult::data( int field )
return TQVariant( val );
}
#ifdef QT_CHECK_RANGE
- qWarning("TQMYSQLResult::data: unknown data type");
+ tqWarning("TQMYSQLResult::data: unknown data type");
#endif
return TQVariant();
}
@@ -368,7 +368,7 @@ static void qServerInit()
// but is vital for the embedded lib
if ( mysql_server_init( 0, 0, 0 ) ) {
# ifdef QT_CHECK_RANGE
- qWarning( "TQMYSQLDriver::qServerInit: unable to start server." );
+ tqWarning( "TQMYSQLDriver::qServerInit: unable to start server." );
# endif
}
@@ -404,7 +404,7 @@ TQMYSQLDriver::TQMYSQLDriver( MYSQL * con, TQObject * parent, const char * name
void TQMYSQLDriver::init()
{
- qSqlOpenExtDict()->insert( this, new TQMYSQLOpenExtension(this) );
+ tqSqlOpenExtDict()->insert( this, new TQMYSQLOpenExtension(this) );
d = new TQMYSQLDriverPrivate();
d->mysql = 0;
qMySqlConnectionCount++;
@@ -417,8 +417,8 @@ TQMYSQLDriver::~TQMYSQLDriver()
qServerEnd();
delete d;
- if ( !qSqlOpenExtDict()->isEmpty() ) {
- TQSqlOpenExtension *ext = qSqlOpenExtDict()->take( this );
+ if ( !tqSqlOpenExtDict()->isEmpty() ) {
+ TQSqlOpenExtension *ext = tqSqlOpenExtDict()->take( this );
delete ext;
}
}
@@ -452,7 +452,7 @@ bool TQMYSQLDriver::open( const TQString&,
const TQString&,
int )
{
- qWarning("TQMYSQLDriver::open(): This version of open() is no longer supported." );
+ tqWarning("TQMYSQLDriver::open(): This version of open() is no longer supported." );
return FALSE;
}
@@ -482,7 +482,7 @@ bool TQMYSQLDriver::open( const TQString& db,
if ( val == "TRUE" || val == "1" )
opts << tmp.left( idx );
else
- qWarning( "TQMYSQLDriver::open: Illegal connect option value '%s'", tmp.latin1() );
+ tqWarning( "TQMYSQLDriver::open: Illegal connect option value '%s'", tmp.latin1() );
} else {
opts << tmp;
}
@@ -505,7 +505,7 @@ bool TQMYSQLDriver::open( const TQString& db,
else if ( opt == "CLIENT_SSL" )
optionFlags |= CLIENT_SSL;
else
- qWarning( "TQMYSQLDriver::open: Unknown connect option '%s'", (*it).latin1() );
+ tqWarning( "TQMYSQLDriver::open: Unknown connect option '%s'", (*it).latin1() );
}
if ( (d->mysql = mysql_init((MYSQL*) 0)) &&
@@ -696,7 +696,7 @@ bool TQMYSQLDriver::beginTransaction()
#endif
if ( !isOpen() ) {
#ifdef QT_CHECK_RANGE
- qWarning( "TQMYSQLDriver::beginTransaction: Database not open" );
+ tqWarning( "TQMYSQLDriver::beginTransaction: Database not open" );
#endif
return FALSE;
}
@@ -714,7 +714,7 @@ bool TQMYSQLDriver::commitTransaction()
#endif
if ( !isOpen() ) {
#ifdef QT_CHECK_RANGE
- qWarning( "TQMYSQLDriver::commitTransaction: Database not open" );
+ tqWarning( "TQMYSQLDriver::commitTransaction: Database not open" );
#endif
return FALSE;
}
@@ -732,7 +732,7 @@ bool TQMYSQLDriver::rollbackTransaction()
#endif
if ( !isOpen() ) {
#ifdef QT_CHECK_RANGE
- qWarning( "TQMYSQLDriver::rollbackTransaction: Database not open" );
+ tqWarning( "TQMYSQLDriver::rollbackTransaction: Database not open" );
#endif
return FALSE;
}
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 2a387f516..f1c9e8da7 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -127,7 +127,7 @@ public:
TQODBCResult * result;
};
-TQPtrDict<TQSqlOpenExtension> *qSqlOpenExtDict();
+TQPtrDict<TQSqlOpenExtension> *tqSqlOpenExtDict();
class TQODBCOpenExtension : public TQSqlOpenExtension
{
@@ -190,7 +190,7 @@ static TQString qODBCWarn( const TQODBCPrivate* odbc)
static void qSqlWarning( const TQString& message, const TQODBCPrivate* odbc )
{
#ifdef QT_CHECK_RANGE
- qWarning( "%s\tError: %s", message.local8Bit().data(), qODBCWarn( odbc ).local8Bit().data() );
+ tqWarning( "%s\tError: %s", message.local8Bit().data(), qODBCWarn( odbc ).local8Bit().data() );
#endif
}
@@ -309,7 +309,7 @@ static TQString qGetStringData( SQLHANDLE hStmt, int column, int colSize, bool&
break;
} else {
#ifdef QT_CHECK_RANGE
- qWarning( "qGetStringData: Error while fetching data (%d)", r );
+ tqWarning( "qGetStringData: Error while fetching data (%d)", r );
#endif
fieldVal = TQString::null;
break;
@@ -341,7 +341,7 @@ static TQByteArray qGetBinaryData( SQLHANDLE hStmt, int column, TQSQLLEN& length
&nullable );
#ifdef QT_CHECK_RANGE
if ( r != SQL_SUCCESS )
- qWarning( "qGetBinaryData: Unable to describe column %d", column );
+ tqWarning( "qGetBinaryData: Unable to describe column %d", column );
#endif
// SQLDescribeCol may return 0 if size cannot be determined
if (!colSize) {
@@ -524,7 +524,7 @@ bool TQODBCPrivate::setConnectionOptions( const TQString& connOpts )
if ( (idx = tmp.find( '=' )) != -1 )
connMap[ tmp.left( idx ) ] = tmp.mid( idx + 1 ).simplifyWhiteSpace();
else
- qWarning( "TQODBCDriver::open: Illegal connect option value '%s'", tmp.latin1() );
+ tqWarning( "TQODBCDriver::open: Illegal connect option value '%s'", tmp.latin1() );
}
if ( connMap.count() ) {
TQMap<TQString, TQString>::ConstIterator it;
@@ -540,7 +540,7 @@ bool TQODBCPrivate::setConnectionOptions( const TQString& connOpts )
} else if ( val == "SQL_MODE_READ_WRITE" ) {
v = SQL_MODE_READ_WRITE;
} else {
- qWarning( TQString( "TQODBCDriver::open: Unknown option value '%1'" ).arg( *it ) );
+ tqWarning( TQString( "TQODBCDriver::open: Unknown option value '%1'" ).arg( *it ) );
break;
}
r = SQLSetConnectAttr( hDbc, SQL_ATTR_ACCESS_MODE, (SQLPOINTER) v, 0 );
@@ -565,7 +565,7 @@ bool TQODBCPrivate::setConnectionOptions( const TQString& connOpts )
} else if ( val == "SQL_FALSE" ) {
v = SQL_FALSE;
} else {
- qWarning( TQString( "TQODBCDriver::open: Unknown option value '%1'" ).arg( *it ) );
+ tqWarning( TQString( "TQODBCDriver::open: Unknown option value '%1'" ).arg( *it ) );
break;
}
r = SQLSetConnectAttr( hDbc, SQL_ATTR_METADATA_ID, (SQLPOINTER) v, 0 );
@@ -587,14 +587,14 @@ bool TQODBCPrivate::setConnectionOptions( const TQString& connOpts )
} else if ( val == "SQL_OPT_TRACE_ON" ) {
v = SQL_OPT_TRACE_ON;
} else {
- qWarning( TQString( "TQODBCDriver::open: Unknown option value '%1'" ).arg( *it ) );
+ tqWarning( TQString( "TQODBCDriver::open: Unknown option value '%1'" ).arg( *it ) );
break;
}
r = SQLSetConnectAttr( hDbc, SQL_ATTR_TRACE, (SQLPOINTER) v, 0 );
}
#ifdef QT_CHECK_RANGE
else {
- qWarning( TQString("TQODBCDriver::open: Unknown connection attribute '%1'").arg( opt ) );
+ tqWarning( TQString("TQODBCDriver::open: Unknown connection attribute '%1'").arg( opt ) );
}
#endif
if ( r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO ) {
@@ -860,7 +860,7 @@ bool TQODBCResult::fetchLast()
TQVariant TQODBCResult::data( int field )
{
if ( field >= (int) d->rInf.count() ) {
- qWarning( "TQODBCResult::data: column %d out of range", field );
+ tqWarning( "TQODBCResult::data: column %d out of range", field );
return TQVariant();
}
if ( fieldCache.contains( field ) )
@@ -1230,7 +1230,7 @@ bool TQODBCResult::exec()
para++;
if ( r != SQL_SUCCESS ) {
#ifdef QT_CHECK_RANGE
- qWarning( "TQODBCResult::exec: unable to bind variable: %s", qODBCWarn( d ).local8Bit().data() );
+ tqWarning( "TQODBCResult::exec: unable to bind variable: %s", qODBCWarn( d ).local8Bit().data() );
#endif
setLastError( qMakeError( "Unable to bind variable", TQSqlError::Statement, d ) );
return FALSE;
@@ -1240,7 +1240,7 @@ bool TQODBCResult::exec()
r = SQLExecute( d->hStmt );
if ( r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO ) {
#ifdef QT_CHECK_RANGE
- qWarning( "TQODBCResult::exec: Unable to execute statement: %s", qODBCWarn( d ).local8Bit().data() );
+ tqWarning( "TQODBCResult::exec: Unable to execute statement: %s", qODBCWarn( d ).local8Bit().data() );
#endif
setLastError( qMakeError( "Unable to execute statement", TQSqlError::Statement, d ) );
return FALSE;
@@ -1345,7 +1345,7 @@ TQODBCDriver::TQODBCDriver( SQLHANDLE env, SQLHANDLE con, TQObject * parent, con
void TQODBCDriver::init()
{
- qSqlOpenExtDict()->insert( this, new TQODBCOpenExtension(this) );
+ tqSqlOpenExtDict()->insert( this, new TQODBCOpenExtension(this) );
d = new TQODBCPrivate();
}
@@ -1353,8 +1353,8 @@ TQODBCDriver::~TQODBCDriver()
{
cleanup();
delete d;
- if ( !qSqlOpenExtDict()->isEmpty() ) {
- TQSqlOpenExtension *ext = qSqlOpenExtDict()->take( this );
+ if ( !tqSqlOpenExtDict()->isEmpty() ) {
+ TQSqlOpenExtension *ext = tqSqlOpenExtDict()->take( this );
delete ext;
}
}
@@ -1398,7 +1398,7 @@ bool TQODBCDriver::open( const TQString&,
const TQString&,
int )
{
- qWarning("TQODBCDriver::open(): This version of open() is no longer supported." );
+ tqWarning("TQODBCDriver::open(): This version of open() is no longer supported." );
return FALSE;
}
@@ -1603,7 +1603,7 @@ bool TQODBCPrivate::checkDriver() const
#endif
if ( sup == SQL_FALSE ) {
#ifdef QT_CHECK_RANGE
- qWarning ( "TQODBCDriver::open: Warning - Driver doesn't support all needed functionality (%d). "
+ tqWarning ( "TQODBCDriver::open: Warning - Driver doesn't support all needed functionality (%d). "
"Please look at the TQt SQL Module Driver documentation for more information.", reqFunc[ i ] );
#endif
return FALSE;
@@ -1623,7 +1623,7 @@ bool TQODBCPrivate::checkDriver() const
#endif
if ( sup == SQL_FALSE ) {
#ifdef QT_CHECK_RANGE
- qWarning( "TQODBCDriver::checkDriver: Warning - Driver doesn't support some non-critical functions (%d)", optFunc[ i ] );
+ tqWarning( "TQODBCDriver::checkDriver: Warning - Driver doesn't support some non-critical functions (%d)", optFunc[ i ] );
#endif
return TRUE;
}
@@ -1656,7 +1656,7 @@ bool TQODBCDriver::beginTransaction()
{
if ( !isOpen() ) {
#ifdef QT_CHECK_RANGE
- qWarning(" TQODBCDriver::beginTransaction: Database not open" );
+ tqWarning(" TQODBCDriver::beginTransaction: Database not open" );
#endif
return FALSE;
}
@@ -1676,7 +1676,7 @@ bool TQODBCDriver::commitTransaction()
{
if ( !isOpen() ) {
#ifdef QT_CHECK_RANGE
- qWarning(" TQODBCDriver::commitTransaction: Database not open" );
+ tqWarning(" TQODBCDriver::commitTransaction: Database not open" );
#endif
return FALSE;
}
@@ -1694,7 +1694,7 @@ bool TQODBCDriver::rollbackTransaction()
{
if ( !isOpen() ) {
#ifdef QT_CHECK_RANGE
- qWarning(" TQODBCDriver::rollbackTransaction: Database not open" );
+ tqWarning(" TQODBCDriver::rollbackTransaction: Database not open" );
#endif
return FALSE;
}
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
index b039a2474..033c69f35 100644
--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -64,8 +64,8 @@
# undef open
#endif
-TQPtrDict<TQSqlDriverExtension> *qSqlDriverExtDict();
-TQPtrDict<TQSqlOpenExtension> *qSqlOpenExtDict();
+TQPtrDict<TQSqlDriverExtension> *tqSqlDriverExtDict();
+TQPtrDict<TQSqlOpenExtension> *tqSqlOpenExtDict();
class TQPSQLPrivate
{
@@ -272,7 +272,7 @@ static TQPoint pointFromString( const TQString& s)
TQVariant TQPSQLResult::data( int i )
{
if ( i >= PQnfields( d->result ) ) {
- qWarning( "TQPSQLResult::data: column %d out of range", i );
+ tqWarning( "TQPSQLResult::data: column %d out of range", i );
return TQVariant();
}
int ptype = PQftype( d->result, i );
@@ -395,7 +395,7 @@ TQVariant TQPSQLResult::data( int i )
int fd = lo_open( d->connection, oid, INV_READ );
#ifdef QT_CHECK_RANGE
if ( fd < 0) {
- qWarning( "TQPSQLResult::data: unable to open large object for read" );
+ tqWarning( "TQPSQLResult::data: unable to open large object for read" );
((TQSqlDriver*)driver())->commitTransaction();
return TQVariant( ba );
}
@@ -429,7 +429,7 @@ TQVariant TQPSQLResult::data( int i )
#endif
if (retval < 0) {
- qWarning( "TQPSQLResult::data: unable to read large object" );
+ tqWarning( "TQPSQLResult::data: unable to read large object" );
} else {
ba.duplicate( buf, size );
}
@@ -441,7 +441,7 @@ TQVariant TQPSQLResult::data( int i )
default:
case TQVariant::Invalid:
#ifdef QT_CHECK_RANGE
- qWarning("TQPSQLResult::data: unknown data type");
+ tqWarning("TQPSQLResult::data: unknown data type");
#endif
;
}
@@ -512,7 +512,7 @@ static void setDatestyle( PGconn* connection )
#ifdef QT_CHECK_RANGE
int status = PQresultStatus( result );
if ( status != PGRES_COMMAND_OK )
- qWarning( "%s", PQerrorMessage( connection ) );
+ tqWarning( "%s", PQerrorMessage( connection ) );
#endif
PQclear( result );
}
@@ -531,7 +531,7 @@ static TQPSQLDriver::Protocol getPSQLVersion( PGconn* connection )
int vMin = rx.cap( 2 ).toInt();
if ( vMaj < 6 ) {
#ifdef QT_CHECK_RANGE
- qWarning( "This version of PostgreSQL is not supported and may not work." );
+ tqWarning( "This version of PostgreSQL is not supported and may not work." );
#endif
return TQPSQLDriver::Version6;
}
@@ -547,7 +547,7 @@ static TQPSQLDriver::Protocol getPSQLVersion( PGconn* connection )
}
} else {
#ifdef QT_CHECK_RANGE
- qWarning( "This version of PostgreSQL is not supported and may not work." );
+ tqWarning( "This version of PostgreSQL is not supported and may not work." );
#endif
}
@@ -574,8 +574,8 @@ TQPSQLDriver::TQPSQLDriver( PGconn * conn, TQObject * parent, const char * name
void TQPSQLDriver::init()
{
- qSqlDriverExtDict()->insert( this, new TQPSQLDriverExtension(this) );
- qSqlOpenExtDict()->insert( this, new TQPSQLOpenExtension(this) );
+ tqSqlDriverExtDict()->insert( this, new TQPSQLDriverExtension(this) );
+ tqSqlOpenExtDict()->insert( this, new TQPSQLOpenExtension(this) );
d = new TQPSQLPrivate();
}
@@ -585,12 +585,12 @@ TQPSQLDriver::~TQPSQLDriver()
if ( d->connection )
PQfinish( d->connection );
delete d;
- if ( !qSqlDriverExtDict()->isEmpty() ) {
- TQSqlDriverExtension *ext = qSqlDriverExtDict()->take( this );
+ if ( !tqSqlDriverExtDict()->isEmpty() ) {
+ TQSqlDriverExtension *ext = tqSqlDriverExtDict()->take( this );
delete ext;
}
- if ( !qSqlOpenExtDict()->isEmpty() ) {
- TQSqlOpenExtension *ext = qSqlOpenExtDict()->take( this );
+ if ( !tqSqlOpenExtDict()->isEmpty() ) {
+ TQSqlOpenExtension *ext = tqSqlOpenExtDict()->take( this );
delete ext;
}
}
@@ -623,7 +623,7 @@ bool TQPSQLDriver::open( const TQString&,
const TQString&,
int )
{
- qWarning("TQPSQLDriver::open(): This version of open() is no longer supported." );
+ tqWarning("TQPSQLDriver::open(): This version of open() is no longer supported." );
return FALSE;
}
@@ -688,7 +688,7 @@ bool TQPSQLDriver::beginTransaction()
{
if ( !isOpen() ) {
#ifdef QT_CHECK_RANGE
- qWarning( "TQPSQLDriver::beginTransaction: Database not open" );
+ tqWarning( "TQPSQLDriver::beginTransaction: Database not open" );
#endif
return FALSE;
}
@@ -706,7 +706,7 @@ bool TQPSQLDriver::commitTransaction()
{
if ( !isOpen() ) {
#ifdef QT_CHECK_RANGE
- qWarning( "TQPSQLDriver::commitTransaction: Database not open" );
+ tqWarning( "TQPSQLDriver::commitTransaction: Database not open" );
#endif
return FALSE;
}
@@ -724,7 +724,7 @@ bool TQPSQLDriver::rollbackTransaction()
{
if ( !isOpen() ) {
#ifdef QT_CHECK_RANGE
- qWarning( "TQPSQLDriver::rollbackTransaction: Database not open" );
+ tqWarning( "TQPSQLDriver::rollbackTransaction: Database not open" );
#endif
return FALSE;
}
diff --git a/src/sql/qdatatable.cpp b/src/sql/qdatatable.cpp
index f300c43e5..3fbdc3260 100644
--- a/src/sql/qdatatable.cpp
+++ b/src/sql/qdatatable.cpp
@@ -112,10 +112,10 @@ public:
#ifdef QT_DEBUG_DATATABLE
void qt_debug_buffer( const TQString& msg, TQSqlRecord* cursor )
{
- qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
- qDebug(msg);
+ tqDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+ tqDebug(msg);
for ( uint j = 0; j < cursor->count(); ++j ) {
- qDebug(cursor->field(j)->name() + " type:" + TQString(cursor->field(j)->value().typeName()) + " value:" + cursor->field(j)->value().toString() );
+ tqDebug(cursor->field(j)->name() + " type:" + TQString(cursor->field(j)->value().typeName()) + " value:" + cursor->field(j)->value().toString() );
}
}
#endif
@@ -1047,7 +1047,7 @@ bool TQDataTable::insertCurrent()
return FALSE;
if ( !sqlCursor()->canInsert() ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQDataTable::insertCurrent: insert not allowed for %s",
+ tqWarning("TQDataTable::insertCurrent: insert not allowed for %s",
sqlCursor()->name().latin1() );
#endif
endInsert();
@@ -1121,7 +1121,7 @@ bool TQDataTable::updateCurrent()
return FALSE;
if ( sqlCursor()->primaryIndex().count() == 0 ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQDataTable::updateCurrent: no primary index for %s",
+ tqWarning("TQDataTable::updateCurrent: no primary index for %s",
sqlCursor()->name().latin1() );
#endif
endUpdate();
@@ -1129,7 +1129,7 @@ bool TQDataTable::updateCurrent()
}
if ( !sqlCursor()->canUpdate() ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQDataTable::updateCurrent: updates not allowed for %s",
+ tqWarning("TQDataTable::updateCurrent: updates not allowed for %s",
sqlCursor()->name().latin1() );
#endif
endUpdate();
@@ -1195,7 +1195,7 @@ bool TQDataTable::deleteCurrent()
return FALSE;
if ( sqlCursor()->primaryIndex().count() == 0 ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQDataTable::deleteCurrent: no primary index %s",
+ tqWarning("TQDataTable::deleteCurrent: no primary index %s",
sqlCursor()->name().latin1() );
#endif
return FALSE;
diff --git a/src/sql/qsqlcursor.cpp b/src/sql/qsqlcursor.cpp
index 3ddd2c9e0..b2a53dbdd 100644
--- a/src/sql/qsqlcursor.cpp
+++ b/src/sql/qsqlcursor.cpp
@@ -400,7 +400,7 @@ void TQSqlCursor::setName( const TQString& name, bool autopopulate )
}
#ifdef QT_CHECK_RANGE
if ( isEmpty() )
- qWarning("TQSqlCursor::setName: unable to build record, does '%s' exist?", name.latin1() );
+ tqWarning("TQSqlCursor::setName: unable to build record, does '%s' exist?", name.latin1() );
#endif
}
}
@@ -1533,7 +1533,7 @@ bool TQSqlCursor::isNull( const TQString& name ) const
void TQSqlCursor::setValue( int i, const TQVariant& val )
{
#ifdef QT_DEBUG
- qDebug("TQSqlCursor::setValue(): This will not affect actual database values. Use primeInsert(), primeUpdate() or primeDelete().");
+ tqDebug("TQSqlCursor::setValue(): This will not affect actual database values. Use primeInsert(), primeUpdate() or primeDelete().");
#endif
TQSqlRecord::setValue( i, val );
}
@@ -1542,7 +1542,7 @@ void TQSqlCursor::setValue( int i, const TQVariant& val )
void TQSqlCursor::setValue( const TQString& name, const TQVariant& val )
{
#ifdef QT_DEBUG
- qDebug("TQSqlCursor::setValue(): This will not affect actual database values. Use primeInsert(), primeUpdate() or primeDelete().");
+ tqDebug("TQSqlCursor::setValue(): This will not affect actual database values. Use primeInsert(), primeUpdate() or primeDelete().");
#endif
TQSqlRecord::setValue( name, val );
}
diff --git a/src/sql/qsqldatabase.cpp b/src/sql/qsqldatabase.cpp
index 582219b49..be51271b3 100644
--- a/src/sql/qsqldatabase.cpp
+++ b/src/sql/qsqldatabase.cpp
@@ -92,7 +92,7 @@ TQPtrDict<TQSqlOpenExtension> *qt_open_extension_dict = 0;
static TQSingleCleanupHandler< TQPtrDict<TQSqlDriverExtension> > qt_driver_ext_cleanup;
static TQSingleCleanupHandler< TQPtrDict<TQSqlOpenExtension> > qt_open_ext_cleanup;
-Q_EXPORT TQPtrDict<TQSqlDriverExtension> *qSqlDriverExtDict()
+Q_EXPORT TQPtrDict<TQSqlDriverExtension> *tqSqlDriverExtDict()
{
if ( !qt_driver_extension_dict ) {
qt_driver_extension_dict = new TQPtrDict<TQSqlDriverExtension>;
@@ -101,7 +101,7 @@ Q_EXPORT TQPtrDict<TQSqlDriverExtension> *qSqlDriverExtDict()
return qt_driver_extension_dict;
}
-Q_EXPORT TQPtrDict<TQSqlOpenExtension> *qSqlOpenExtDict()
+Q_EXPORT TQPtrDict<TQSqlOpenExtension> *tqSqlOpenExtDict()
{
if ( !qt_open_extension_dict ) {
qt_open_extension_dict = new TQPtrDict<TQSqlOpenExtension>;
@@ -212,7 +212,7 @@ TQSqlDatabaseManager* TQSqlDatabaseManager::instance()
static TQGuardedPtr<TQSqlDatabaseManager> sqlConnection = 0;
if ( !sqlConnection ) {
if( tqApp == 0 ){
- qFatal( "TQSqlDatabaseManager: A TQApplication object has to be "
+ tqFatal( "TQSqlDatabaseManager: A TQApplication object has to be "
"instantiated in order to use the SQL module." );
return 0;
}
@@ -238,7 +238,7 @@ TQSqlDatabase* TQSqlDatabaseManager::database( const TQString& name, bool open )
db->open();
#ifdef QT_CHECK_RANGE
if ( !db->isOpen() )
- qWarning("TQSqlDatabaseManager::database: unable to open database: %s: %s",
+ tqWarning("TQSqlDatabaseManager::database: unable to open database: %s: %s",
db->lastError().databaseText().latin1(), db->lastError().driverText().latin1() );
#endif
}
@@ -690,8 +690,8 @@ void TQSqlDatabase::init( const TQString& type, const TQString& )
if ( !d->driver ) {
#ifdef QT_CHECK_RANGE
- qWarning( "TQSqlDatabase: %s driver not loaded", type.latin1() );
- qWarning( "TQSqlDatabase: available drivers: %s", drivers().join(" ").latin1() );
+ tqWarning( "TQSqlDatabase: %s driver not loaded", type.latin1() );
+ tqWarning( "TQSqlDatabase: available drivers: %s", drivers().join(" ").latin1() );
#endif
d->driver = new TQNullDriver();
d->driver->setLastError( TQSqlError( "Driver not loaded", "Driver not loaded" ) );
diff --git a/src/sql/qsqldriver.cpp b/src/sql/qsqldriver.cpp
index 3bce7ee43..f4798c9af 100644
--- a/src/sql/qsqldriver.cpp
+++ b/src/sql/qsqldriver.cpp
@@ -50,8 +50,8 @@
#define DBState_OpenError 0x0002
// ### This needs to go in 4.0!
-TQPtrDict<TQSqlDriverExtension> *qSqlDriverExtDict();
-TQPtrDict<TQSqlOpenExtension> *qSqlOpenExtDict();
+TQPtrDict<TQSqlDriverExtension> *tqSqlDriverExtDict();
+TQPtrDict<TQSqlOpenExtension> *tqSqlOpenExtDict();
/*!
\class TQSqlDriver ntqsqldriver.h
@@ -132,8 +132,8 @@ TQSqlDriver::~TQSqlDriver()
bool TQSqlDriver::isOpen() const
{
- if ( !qSqlDriverExtDict()->isEmpty() ) {
- TQSqlDriverExtension *ext = qSqlDriverExtDict()->find( (TQSqlDriver *) this );
+ if ( !tqSqlDriverExtDict()->isEmpty() ) {
+ TQSqlDriverExtension *ext = tqSqlDriverExtDict()->find( (TQSqlDriver *) this );
if ( ext )
return ext->isOpen();
}
@@ -498,8 +498,8 @@ bool TQSqlDriver::open( const TQString& db,
int port,
const TQString& connOpts )
{
- if ( !qSqlOpenExtDict()->isEmpty() ) {
- TQSqlOpenExtension *ext = qSqlOpenExtDict()->find( (TQSqlDriver *) this );
+ if ( !tqSqlOpenExtDict()->isEmpty() ) {
+ TQSqlOpenExtension *ext = tqSqlOpenExtDict()->find( (TQSqlDriver *) this );
if ( ext )
return ext->open( db, user, password, host, port, connOpts );
}
diff --git a/src/sql/qsqlfield.cpp b/src/sql/qsqlfield.cpp
index ca7edc3d5..0dec46790 100644
--- a/src/sql/qsqlfield.cpp
+++ b/src/sql/qsqlfield.cpp
@@ -193,7 +193,7 @@ void TQSqlField::setValue( const TQVariant& value )
return;
if ( value.type() != d->type ) {
if ( !val.canCast( d->type ) )
- qWarning("TQSqlField::setValue: %s cannot cast from %s to %s",
+ tqWarning("TQSqlField::setValue: %s cannot cast from %s to %s",
nm.local8Bit().data(), value.typeName(), TQVariant::typeToName( d->type ) );
}
val = value;
diff --git a/src/sql/qsqlindex.cpp b/src/sql/qsqlindex.cpp
index d0df39788..6f69ae27d 100644
--- a/src/sql/qsqlindex.cpp
+++ b/src/sql/qsqlindex.cpp
@@ -277,7 +277,7 @@ TQSqlIndex TQSqlIndex::fromStringList( const TQStringList& l, const TQSqlCursor*
if ( field )
newSort.append( *field, desc );
else
- qWarning( "TQSqlIndex::fromStringList: unknown field: '%s'", f.latin1());
+ tqWarning( "TQSqlIndex::fromStringList: unknown field: '%s'", f.latin1());
}
return newSort;
}
diff --git a/src/sql/qsqlmanager_p.cpp b/src/sql/qsqlmanager_p.cpp
index c7c3ec3c5..563406772 100644
--- a/src/sql/qsqlmanager_p.cpp
+++ b/src/sql/qsqlmanager_p.cpp
@@ -307,10 +307,10 @@ static int compare_recs( const TQSqlRecord* buf1, const TQSqlRecord* buf2,
#ifdef QT_DEBUG_DATAMANAGER
static void debug_datamanager_buffer( const TQString& msg, TQSqlRecord* cursor )
{
- qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
- qDebug( "%s", msg.latin1() );
+ tqDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+ tqDebug( "%s", msg.latin1() );
for ( uint j = 0; j < cursor->count(); ++j ) {
- qDebug( "%s", (cursor->field(j)->name() + " type:"
+ tqDebug( "%s", (cursor->field(j)->name() + " type:"
+ TQString(cursor->field(j)->value().typeName())
+ " value:" + cursor->field(j)->value().toString())
.latin1() );
@@ -348,7 +348,7 @@ update. For example:
bool TQSqlCursorManager::findBuffer( const TQSqlIndex& idx, int atHint )
{
#ifdef QT_DEBUG_DATAMANAGER
- qDebug("TQSqlCursorManager::findBuffer:");
+ tqDebug("TQSqlCursorManager::findBuffer:");
#endif
TQSqlCursor* cur = cursor();
if ( !cur )
@@ -363,7 +363,7 @@ bool TQSqlCursorManager::findBuffer( const TQSqlIndex& idx, int atHint )
TQSqlRecord* buf = cur->editBuffer();
bool indexEquals = FALSE;
#ifdef QT_DEBUG_DATAMANAGER
- qDebug(" Checking hint...");
+ tqDebug(" Checking hint...");
#endif
/* check the hint */
if ( cur->seek( atHint ) )
@@ -371,7 +371,7 @@ bool TQSqlCursorManager::findBuffer( const TQSqlIndex& idx, int atHint )
if ( !indexEquals ) {
#ifdef QT_DEBUG_DATAMANAGER
- qDebug(" Checking current page...");
+ tqDebug(" Checking current page...");
#endif
/* check current page */
int pageSize = 20;
@@ -389,7 +389,7 @@ bool TQSqlCursorManager::findBuffer( const TQSqlIndex& idx, int atHint )
if ( !indexEquals && cur->driver()->hasFeature( TQSqlDriver::QuerySize )
&& cur->sort().count() ) {
#ifdef QT_DEBUG_DATAMANAGER
- qDebug(" Using binary search...");
+ tqDebug(" Using binary search...");
#endif
// binary search based on record buffer and current sort fields
int lo = 0;
@@ -442,7 +442,7 @@ bool TQSqlCursorManager::findBuffer( const TQSqlIndex& idx, int atHint )
if ( !indexEquals ) {
#ifdef QT_DEBUG_DATAMANAGER
- qDebug(" Using brute search...");
+ tqDebug(" Using brute search...");
#endif
#ifndef QT_NO_CURSOR
TQApplication::setOverrideCursor( TQt::waitCursor );
@@ -465,7 +465,7 @@ bool TQSqlCursorManager::findBuffer( const TQSqlIndex& idx, int atHint )
#endif
}
#ifdef QT_DEBUG_DATAMANAGER
- qDebug(" Done, result:" + TQString::number( indexEquals ) );
+ tqDebug(" Done, result:" + TQString::number( indexEquals ) );
#endif
return indexEquals;
}
diff --git a/src/sql/qsqlpropertymap.cpp b/src/sql/qsqlpropertymap.cpp
index 9d619a016..2d32583c3 100644
--- a/src/sql/qsqlpropertymap.cpp
+++ b/src/sql/qsqlpropertymap.cpp
@@ -221,7 +221,7 @@ TQVariant TQSqlPropertyMap::property( TQWidget * widget )
if ( !mo ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQSqlPropertyMap::property: %s does not exist", widget->metaObject()->className() );
+ tqWarning("TQSqlPropertyMap::property: %s does not exist", widget->metaObject()->className() );
#endif
return TQVariant();
}
@@ -240,7 +240,7 @@ void TQSqlPropertyMap::setProperty( TQWidget * widget, const TQVariant & value )
mo = mo->superClass();
if ( !mo ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQSqlPropertyMap::setProperty: %s not handled by TQSqlPropertyMap", widget->metaObject()->className() );
+ tqWarning("TQSqlPropertyMap::setProperty: %s not handled by TQSqlPropertyMap", widget->metaObject()->className() );
#endif
return;
}
diff --git a/src/sql/qsqlquery.cpp b/src/sql/qsqlquery.cpp
index 94325d507..ac4631b1a 100644
--- a/src/sql/qsqlquery.cpp
+++ b/src/sql/qsqlquery.cpp
@@ -353,7 +353,7 @@ bool TQSqlQuery::exec ( const TQString& query )
d->sqlResult->setAt( TQSql::BeforeFirst );
if ( !driver() ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQSqlQuery::exec: no driver" );
+ tqWarning("TQSqlQuery::exec: no driver" );
#endif
return FALSE;
}
@@ -363,18 +363,18 @@ bool TQSqlQuery::exec ( const TQString& query )
d->executedQuery = d->sqlResult->lastQuery();
if ( !driver()->isOpen() || driver()->isOpenError() ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQSqlQuery::exec: database not open" );
+ tqWarning("TQSqlQuery::exec: database not open" );
#endif
return FALSE;
}
if ( query.isNull() || query.length() == 0 ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQSqlQuery::exec: empty query" );
+ tqWarning("TQSqlQuery::exec: empty query" );
#endif
return FALSE;
}
#ifdef QT_DEBUG_SQL
- qDebug( "\n TQSqlQuery: " + query );
+ tqDebug( "\n TQSqlQuery: " + query );
#endif
return d->sqlResult->reset( query );
}
@@ -403,7 +403,7 @@ TQVariant TQSqlQuery::value( int i ) const
return d->sqlResult->data( i );
} else {
#ifdef QT_CHECK_RANGE
- qWarning( "TQSqlQuery::value: not positioned on a valid record" );
+ tqWarning( "TQSqlQuery::value: not positioned on a valid record" );
#endif
}
return TQVariant();
@@ -544,7 +544,7 @@ bool TQSqlQuery::seek( int i, bool relative )
// let drivers optimize
if ( isForwardOnly() && actualIdx < at() ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQSqlQuery::seek: cannot seek backwards in a forward only query" );
+ tqWarning("TQSqlQuery::seek: cannot seek backwards in a forward only query" );
#endif
afterSeek();
return FALSE;
@@ -661,7 +661,7 @@ bool TQSqlQuery::prev()
return FALSE;
if ( isForwardOnly() ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQSqlQuery::seek: cannot seek backwards in a forward only query" );
+ tqWarning("TQSqlQuery::seek: cannot seek backwards in a forward only query" );
#endif
return FALSE;
}
@@ -705,7 +705,7 @@ bool TQSqlQuery::first()
return FALSE;
if ( isForwardOnly() && at() > TQSql::BeforeFirst ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQSqlQuery::seek: cannot seek backwards in a forward only query" );
+ tqWarning("TQSqlQuery::seek: cannot seek backwards in a forward only query" );
#endif
return FALSE;
}
@@ -937,7 +937,7 @@ bool TQSqlQuery::prepare( const TQString& query )
d->sqlResult->extension()->clear();
if ( !driver() ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQSqlQuery::prepare: no driver" );
+ tqWarning("TQSqlQuery::prepare: no driver" );
#endif
return FALSE;
}
@@ -946,18 +946,18 @@ bool TQSqlQuery::prepare( const TQString& query )
d->sqlResult->setQuery( query.stripWhiteSpace() );
if ( !driver()->isOpen() || driver()->isOpenError() ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQSqlQuery::prepare: database not open" );
+ tqWarning("TQSqlQuery::prepare: database not open" );
#endif
return FALSE;
}
if ( query.isNull() || query.length() == 0 ) {
#ifdef QT_CHECK_RANGE
- qWarning("TQSqlQuery::prepare: empty query" );
+ tqWarning("TQSqlQuery::prepare: empty query" );
#endif
return FALSE;
}
#ifdef QT_DEBUG_SQL
- qDebug( "\n TQSqlQuery: " + query );
+ tqDebug( "\n TQSqlQuery: " + query );
#endif
TQString q = query;
TQRegExp rx(TQString::fromLatin1("'[^']*'|:([a-zA-Z0-9_]+)"));
@@ -1176,7 +1176,7 @@ TQVariant TQSqlQuery::boundValue( int pos ) const
TQMap<TQString, TQVariant>::ConstIterator it;
TQMap<TQString, TQVariant> vals = query.boundValues();
for ( it = vals.begin(); it != vals.end(); ++it )
- qWarning( "Placeholder: " + it.key() + ", Value: " + (*it).toString() );
+ tqWarning( "Placeholder: " + it.key() + ", Value: " + (*it).toString() );
...
// Examine the bound values - bound using positional binding
@@ -1184,7 +1184,7 @@ TQVariant TQSqlQuery::boundValue( int pos ) const
TQValueList<TQVariant> list = query.boundValues().values();
int i = 0;
for ( it = list.begin(); it != list.end(); ++it )
- qWarning( "Placeholder pos: %d, Value: " + (*it).toString(), i++ );
+ tqWarning( "Placeholder pos: %d, Value: " + (*it).toString(), i++ );
...
\endcode
diff --git a/src/sql/qsqlrecord.cpp b/src/sql/qsqlrecord.cpp
index 998ba0a71..b1e0aa8e3 100644
--- a/src/sql/qsqlrecord.cpp
+++ b/src/sql/qsqlrecord.cpp
@@ -302,7 +302,7 @@ int TQSqlRecord::position( const TQString& name ) const
return i;
}
#ifdef QT_CHECK_RANGE
- qWarning( "TQSqlRecord::position: unable to find field %s", name.latin1() );
+ tqWarning( "TQSqlRecord::position: unable to find field %s", name.latin1() );
#endif
return -1;
}
@@ -317,7 +317,7 @@ TQSqlField* TQSqlRecord::field( int i )
checkDetach();
if ( !sh->d->contains( i ) ) {
#ifdef QT_CHECK_RANGE
- qWarning( "TQSqlRecord::field: index out of range: %d", i );
+ tqWarning( "TQSqlRecord::field: index out of range: %d", i );
#endif
return 0;
}
@@ -348,7 +348,7 @@ const TQSqlField* TQSqlRecord::field( int i ) const
{
if ( !sh->d->contains( i ) ) {
#ifdef QT_CHECK_RANGE
- qWarning( "TQSqlRecord::field: index out of range: %d", i );
+ tqWarning( "TQSqlRecord::field: index out of range: %d", i );
#endif // QT_CHECK_RANGE
return 0;
}