diff options
Diffstat (limited to 'src/sql/drivers')
-rw-r--r-- | src/sql/drivers/ibase/qsql_ibase.cpp | 6 | ||||
-rw-r--r-- | src/sql/drivers/mysql/qsql_mysql.cpp | 26 | ||||
-rw-r--r-- | src/sql/drivers/odbc/qsql_odbc.cpp | 42 | ||||
-rw-r--r-- | src/sql/drivers/psql/qsql_psql.cpp | 38 |
4 files changed, 56 insertions, 56 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; } |