diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-03-01 13:24:30 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-03-01 13:24:30 -0600 |
commit | a830bf10b7d4ed2c83ffe68c0b22d7c4ba9860b0 (patch) | |
tree | 3910055c634e2ca44eacd2c892118634df9b3597 /src/sql/drivers | |
parent | b0b53cc84f215df9b9bcce77253a6b7a9d300986 (diff) | |
download | qt3-a830bf10b7d4ed2c83ffe68c0b22d7c4ba9860b0.tar.gz qt3-a830bf10b7d4ed2c83ffe68c0b22d7c4ba9860b0.zip |
Rename additional global TQt functions
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 6954ef8..793a157 100644 --- a/src/sql/drivers/ibase/qsql_ibase.cpp +++ b/src/sql/drivers/ibase/qsql_ibase.cpp @@ -411,7 +411,7 @@ QIBaseResult::~QIBaseResult() bool QIBaseResult::prepare(const QString& 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 QIBaseResult::exec() if (d->inda && extension()->index.count() > 0) { QMap<int, QString>::ConstIterator it; if ((int)extension()->index.count() > d->inda->sqld) { - qWarning("QIBaseResult::exec: Parameter mismatch, expected %d, got %d parameters", d->inda->sqld, extension()->index.count()); + tqWarning("QIBaseResult::exec: Parameter mismatch, expected %d, got %d parameters", d->inda->sqld, extension()->index.count()); return FALSE; } int para = 0; @@ -560,7 +560,7 @@ bool QIBaseResult::exec() bool QIBaseResult::reset (const QString& 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 7cfe0a7..67d3684 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 -QPtrDict<QSqlOpenExtension> *qSqlOpenExtDict(); +QPtrDict<QSqlOpenExtension> *tqSqlOpenExtDict(); static int qMySqlConnectionCount = 0; static bool qMySqlInitHandledByUser = FALSE; @@ -237,7 +237,7 @@ bool QMYSQLResult::fetchFirst() QVariant QMYSQLResult::data( int field ) { if ( !isSelect() || field >= (int) d->fieldTypes.count() ) { - qWarning( "QMYSQLResult::data: column %d out of range", field ); + tqWarning( "QMYSQLResult::data: column %d out of range", field ); return QVariant(); } @@ -284,7 +284,7 @@ QVariant QMYSQLResult::data( int field ) return QVariant( val ); } #ifdef QT_CHECK_RANGE - qWarning("QMYSQLResult::data: unknown data type"); + tqWarning("QMYSQLResult::data: unknown data type"); #endif return QVariant(); } @@ -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( "QMYSQLDriver::qServerInit: unable to start server." ); + tqWarning( "QMYSQLDriver::qServerInit: unable to start server." ); # endif } @@ -404,7 +404,7 @@ QMYSQLDriver::QMYSQLDriver( MYSQL * con, QObject * parent, const char * name ) void QMYSQLDriver::init() { - qSqlOpenExtDict()->insert( this, new QMYSQLOpenExtension(this) ); + tqSqlOpenExtDict()->insert( this, new QMYSQLOpenExtension(this) ); d = new QMYSQLDriverPrivate(); d->mysql = 0; qMySqlConnectionCount++; @@ -417,8 +417,8 @@ QMYSQLDriver::~QMYSQLDriver() qServerEnd(); delete d; - if ( !qSqlOpenExtDict()->isEmpty() ) { - QSqlOpenExtension *ext = qSqlOpenExtDict()->take( this ); + if ( !tqSqlOpenExtDict()->isEmpty() ) { + QSqlOpenExtension *ext = tqSqlOpenExtDict()->take( this ); delete ext; } } @@ -452,7 +452,7 @@ bool QMYSQLDriver::open( const QString&, const QString&, int ) { - qWarning("QMYSQLDriver::open(): This version of open() is no longer supported." ); + tqWarning("QMYSQLDriver::open(): This version of open() is no longer supported." ); return FALSE; } @@ -482,7 +482,7 @@ bool QMYSQLDriver::open( const QString& db, if ( val == "TRUE" || val == "1" ) opts << tmp.left( idx ); else - qWarning( "QMYSQLDriver::open: Illegal connect option value '%s'", tmp.latin1() ); + tqWarning( "QMYSQLDriver::open: Illegal connect option value '%s'", tmp.latin1() ); } else { opts << tmp; } @@ -505,7 +505,7 @@ bool QMYSQLDriver::open( const QString& db, else if ( opt == "CLIENT_SSL" ) optionFlags |= CLIENT_SSL; else - qWarning( "QMYSQLDriver::open: Unknown connect option '%s'", (*it).latin1() ); + tqWarning( "QMYSQLDriver::open: Unknown connect option '%s'", (*it).latin1() ); } if ( (d->mysql = mysql_init((MYSQL*) 0)) && @@ -696,7 +696,7 @@ bool QMYSQLDriver::beginTransaction() #endif if ( !isOpen() ) { #ifdef QT_CHECK_RANGE - qWarning( "QMYSQLDriver::beginTransaction: Database not open" ); + tqWarning( "QMYSQLDriver::beginTransaction: Database not open" ); #endif return FALSE; } @@ -714,7 +714,7 @@ bool QMYSQLDriver::commitTransaction() #endif if ( !isOpen() ) { #ifdef QT_CHECK_RANGE - qWarning( "QMYSQLDriver::commitTransaction: Database not open" ); + tqWarning( "QMYSQLDriver::commitTransaction: Database not open" ); #endif return FALSE; } @@ -732,7 +732,7 @@ bool QMYSQLDriver::rollbackTransaction() #endif if ( !isOpen() ) { #ifdef QT_CHECK_RANGE - qWarning( "QMYSQLDriver::rollbackTransaction: Database not open" ); + tqWarning( "QMYSQLDriver::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 b09afd2..416e722 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -127,7 +127,7 @@ public: QODBCResult * result; }; -QPtrDict<QSqlOpenExtension> *qSqlOpenExtDict(); +QPtrDict<QSqlOpenExtension> *tqSqlOpenExtDict(); class QODBCOpenExtension : public QSqlOpenExtension { @@ -190,7 +190,7 @@ static QString qODBCWarn( const QODBCPrivate* odbc) static void qSqlWarning( const QString& message, const QODBCPrivate* 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 QString qGetStringData( SQLHANDLE hStmt, int column, int colSize, bool& i break; } else { #ifdef QT_CHECK_RANGE - qWarning( "qGetStringData: Error while fetching data (%d)", r ); + tqWarning( "qGetStringData: Error while fetching data (%d)", r ); #endif fieldVal = QString::null; break; @@ -341,7 +341,7 @@ static QByteArray qGetBinaryData( SQLHANDLE hStmt, int column, QSQLLEN& lengthIn &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 QODBCPrivate::setConnectionOptions( const QString& connOpts ) if ( (idx = tmp.find( '=' )) != -1 ) connMap[ tmp.left( idx ) ] = tmp.mid( idx + 1 ).simplifyWhiteSpace(); else - qWarning( "QODBCDriver::open: Illegal connect option value '%s'", tmp.latin1() ); + tqWarning( "QODBCDriver::open: Illegal connect option value '%s'", tmp.latin1() ); } if ( connMap.count() ) { QMap<QString, QString>::ConstIterator it; @@ -540,7 +540,7 @@ bool QODBCPrivate::setConnectionOptions( const QString& connOpts ) } else if ( val == "SQL_MODE_READ_WRITE" ) { v = SQL_MODE_READ_WRITE; } else { - qWarning( QString( "QODBCDriver::open: Unknown option value '%1'" ).arg( *it ) ); + tqWarning( QString( "QODBCDriver::open: Unknown option value '%1'" ).arg( *it ) ); break; } r = SQLSetConnectAttr( hDbc, SQL_ATTR_ACCESS_MODE, (SQLPOINTER) v, 0 ); @@ -565,7 +565,7 @@ bool QODBCPrivate::setConnectionOptions( const QString& connOpts ) } else if ( val == "SQL_FALSE" ) { v = SQL_FALSE; } else { - qWarning( QString( "QODBCDriver::open: Unknown option value '%1'" ).arg( *it ) ); + tqWarning( QString( "QODBCDriver::open: Unknown option value '%1'" ).arg( *it ) ); break; } r = SQLSetConnectAttr( hDbc, SQL_ATTR_METADATA_ID, (SQLPOINTER) v, 0 ); @@ -587,14 +587,14 @@ bool QODBCPrivate::setConnectionOptions( const QString& connOpts ) } else if ( val == "SQL_OPT_TRACE_ON" ) { v = SQL_OPT_TRACE_ON; } else { - qWarning( QString( "QODBCDriver::open: Unknown option value '%1'" ).arg( *it ) ); + tqWarning( QString( "QODBCDriver::open: Unknown option value '%1'" ).arg( *it ) ); break; } r = SQLSetConnectAttr( hDbc, SQL_ATTR_TRACE, (SQLPOINTER) v, 0 ); } #ifdef QT_CHECK_RANGE else { - qWarning( QString("QODBCDriver::open: Unknown connection attribute '%1'").arg( opt ) ); + tqWarning( QString("QODBCDriver::open: Unknown connection attribute '%1'").arg( opt ) ); } #endif if ( r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO ) { @@ -860,7 +860,7 @@ bool QODBCResult::fetchLast() QVariant QODBCResult::data( int field ) { if ( field >= (int) d->rInf.count() ) { - qWarning( "QODBCResult::data: column %d out of range", field ); + tqWarning( "QODBCResult::data: column %d out of range", field ); return QVariant(); } if ( fieldCache.contains( field ) ) @@ -1230,7 +1230,7 @@ bool QODBCResult::exec() para++; if ( r != SQL_SUCCESS ) { #ifdef QT_CHECK_RANGE - qWarning( "QODBCResult::exec: unable to bind variable: %s", qODBCWarn( d ).local8Bit().data() ); + tqWarning( "QODBCResult::exec: unable to bind variable: %s", qODBCWarn( d ).local8Bit().data() ); #endif setLastError( qMakeError( "Unable to bind variable", QSqlError::Statement, d ) ); return FALSE; @@ -1240,7 +1240,7 @@ bool QODBCResult::exec() r = SQLExecute( d->hStmt ); if ( r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO ) { #ifdef QT_CHECK_RANGE - qWarning( "QODBCResult::exec: Unable to execute statement: %s", qODBCWarn( d ).local8Bit().data() ); + tqWarning( "QODBCResult::exec: Unable to execute statement: %s", qODBCWarn( d ).local8Bit().data() ); #endif setLastError( qMakeError( "Unable to execute statement", QSqlError::Statement, d ) ); return FALSE; @@ -1345,7 +1345,7 @@ QODBCDriver::QODBCDriver( SQLHANDLE env, SQLHANDLE con, QObject * parent, const void QODBCDriver::init() { - qSqlOpenExtDict()->insert( this, new QODBCOpenExtension(this) ); + tqSqlOpenExtDict()->insert( this, new QODBCOpenExtension(this) ); d = new QODBCPrivate(); } @@ -1353,8 +1353,8 @@ QODBCDriver::~QODBCDriver() { cleanup(); delete d; - if ( !qSqlOpenExtDict()->isEmpty() ) { - QSqlOpenExtension *ext = qSqlOpenExtDict()->take( this ); + if ( !tqSqlOpenExtDict()->isEmpty() ) { + QSqlOpenExtension *ext = tqSqlOpenExtDict()->take( this ); delete ext; } } @@ -1398,7 +1398,7 @@ bool QODBCDriver::open( const QString&, const QString&, int ) { - qWarning("QODBCDriver::open(): This version of open() is no longer supported." ); + tqWarning("QODBCDriver::open(): This version of open() is no longer supported." ); return FALSE; } @@ -1603,7 +1603,7 @@ bool QODBCPrivate::checkDriver() const #endif if ( sup == SQL_FALSE ) { #ifdef QT_CHECK_RANGE - qWarning ( "QODBCDriver::open: Warning - Driver doesn't support all needed functionality (%d). " + tqWarning ( "QODBCDriver::open: Warning - Driver doesn't support all needed functionality (%d). " "Please look at the Qt SQL Module Driver documentation for more information.", reqFunc[ i ] ); #endif return FALSE; @@ -1623,7 +1623,7 @@ bool QODBCPrivate::checkDriver() const #endif if ( sup == SQL_FALSE ) { #ifdef QT_CHECK_RANGE - qWarning( "QODBCDriver::checkDriver: Warning - Driver doesn't support some non-critical functions (%d)", optFunc[ i ] ); + tqWarning( "QODBCDriver::checkDriver: Warning - Driver doesn't support some non-critical functions (%d)", optFunc[ i ] ); #endif return TRUE; } @@ -1656,7 +1656,7 @@ bool QODBCDriver::beginTransaction() { if ( !isOpen() ) { #ifdef QT_CHECK_RANGE - qWarning(" QODBCDriver::beginTransaction: Database not open" ); + tqWarning(" QODBCDriver::beginTransaction: Database not open" ); #endif return FALSE; } @@ -1676,7 +1676,7 @@ bool QODBCDriver::commitTransaction() { if ( !isOpen() ) { #ifdef QT_CHECK_RANGE - qWarning(" QODBCDriver::commitTransaction: Database not open" ); + tqWarning(" QODBCDriver::commitTransaction: Database not open" ); #endif return FALSE; } @@ -1694,7 +1694,7 @@ bool QODBCDriver::rollbackTransaction() { if ( !isOpen() ) { #ifdef QT_CHECK_RANGE - qWarning(" QODBCDriver::rollbackTransaction: Database not open" ); + tqWarning(" QODBCDriver::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 7fe1a91..84c3ff2 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -64,8 +64,8 @@ # undef open #endif -QPtrDict<QSqlDriverExtension> *qSqlDriverExtDict(); -QPtrDict<QSqlOpenExtension> *qSqlOpenExtDict(); +QPtrDict<QSqlDriverExtension> *tqSqlDriverExtDict(); +QPtrDict<QSqlOpenExtension> *tqSqlOpenExtDict(); class QPSQLPrivate { @@ -272,7 +272,7 @@ static QPoint pointFromString( const QString& s) QVariant QPSQLResult::data( int i ) { if ( i >= PQnfields( d->result ) ) { - qWarning( "QPSQLResult::data: column %d out of range", i ); + tqWarning( "QPSQLResult::data: column %d out of range", i ); return QVariant(); } int ptype = PQftype( d->result, i ); @@ -395,7 +395,7 @@ QVariant QPSQLResult::data( int i ) int fd = lo_open( d->connection, oid, INV_READ ); #ifdef QT_CHECK_RANGE if ( fd < 0) { - qWarning( "QPSQLResult::data: unable to open large object for read" ); + tqWarning( "QPSQLResult::data: unable to open large object for read" ); ((QSqlDriver*)driver())->commitTransaction(); return QVariant( ba ); } @@ -429,7 +429,7 @@ QVariant QPSQLResult::data( int i ) #endif if (retval < 0) { - qWarning( "QPSQLResult::data: unable to read large object" ); + tqWarning( "QPSQLResult::data: unable to read large object" ); } else { ba.duplicate( buf, size ); } @@ -441,7 +441,7 @@ QVariant QPSQLResult::data( int i ) default: case QVariant::Invalid: #ifdef QT_CHECK_RANGE - qWarning("QPSQLResult::data: unknown data type"); + tqWarning("QPSQLResult::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 QPSQLDriver::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 QPSQLDriver::Version6; } @@ -547,7 +547,7 @@ static QPSQLDriver::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 @@ QPSQLDriver::QPSQLDriver( PGconn * conn, QObject * parent, const char * name ) void QPSQLDriver::init() { - qSqlDriverExtDict()->insert( this, new QPSQLDriverExtension(this) ); - qSqlOpenExtDict()->insert( this, new QPSQLOpenExtension(this) ); + tqSqlDriverExtDict()->insert( this, new QPSQLDriverExtension(this) ); + tqSqlOpenExtDict()->insert( this, new QPSQLOpenExtension(this) ); d = new QPSQLPrivate(); } @@ -585,12 +585,12 @@ QPSQLDriver::~QPSQLDriver() if ( d->connection ) PQfinish( d->connection ); delete d; - if ( !qSqlDriverExtDict()->isEmpty() ) { - QSqlDriverExtension *ext = qSqlDriverExtDict()->take( this ); + if ( !tqSqlDriverExtDict()->isEmpty() ) { + QSqlDriverExtension *ext = tqSqlDriverExtDict()->take( this ); delete ext; } - if ( !qSqlOpenExtDict()->isEmpty() ) { - QSqlOpenExtension *ext = qSqlOpenExtDict()->take( this ); + if ( !tqSqlOpenExtDict()->isEmpty() ) { + QSqlOpenExtension *ext = tqSqlOpenExtDict()->take( this ); delete ext; } } @@ -623,7 +623,7 @@ bool QPSQLDriver::open( const QString&, const QString&, int ) { - qWarning("QPSQLDriver::open(): This version of open() is no longer supported." ); + tqWarning("QPSQLDriver::open(): This version of open() is no longer supported." ); return FALSE; } @@ -688,7 +688,7 @@ bool QPSQLDriver::beginTransaction() { if ( !isOpen() ) { #ifdef QT_CHECK_RANGE - qWarning( "QPSQLDriver::beginTransaction: Database not open" ); + tqWarning( "QPSQLDriver::beginTransaction: Database not open" ); #endif return FALSE; } @@ -706,7 +706,7 @@ bool QPSQLDriver::commitTransaction() { if ( !isOpen() ) { #ifdef QT_CHECK_RANGE - qWarning( "QPSQLDriver::commitTransaction: Database not open" ); + tqWarning( "QPSQLDriver::commitTransaction: Database not open" ); #endif return FALSE; } @@ -724,7 +724,7 @@ bool QPSQLDriver::rollbackTransaction() { if ( !isOpen() ) { #ifdef QT_CHECK_RANGE - qWarning( "QPSQLDriver::rollbackTransaction: Database not open" ); + tqWarning( "QPSQLDriver::rollbackTransaction: Database not open" ); #endif return FALSE; } |