diff options
| author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-08-09 22:25:47 -0500 |
|---|---|---|
| committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-08-09 22:25:47 -0500 |
| commit | eaa7ee2e0bbca40ba3173c4304f81957e8964291 (patch) | |
| tree | 4f793aa48a5080aedc94ce6e519c3b86708f2b88 /tqtinterface/qt4/src/sql/drivers | |
| parent | 79a9d7a46a20d4a0923bc06fc471fdc2176ef865 (diff) | |
| download | experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.tar.gz experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.zip | |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
Diffstat (limited to 'tqtinterface/qt4/src/sql/drivers')
4 files changed, 19 insertions, 19 deletions
diff --git a/tqtinterface/qt4/src/sql/drivers/mysql/tqsql_mysql.cpp b/tqtinterface/qt4/src/sql/drivers/mysql/tqsql_mysql.cpp index f97cd2e..e13f12b 100644 --- a/tqtinterface/qt4/src/sql/drivers/mysql/tqsql_mysql.cpp +++ b/tqtinterface/qt4/src/sql/drivers/mysql/tqsql_mysql.cpp @@ -476,7 +476,7 @@ bool TQMYSTQLDriver::open( const TQString& db, for ( it = raw.begin(); it != raw.end(); ++it ) { TQString tmp( *it ); int idx; - if ( (idx = tmp.tqfind( '=' )) != -1 ) { + if ( (idx = tmp.find( '=' )) != -1 ) { TQString val( tmp.mid( idx + 1 ) ); val.simplifyWhiteSpace(); if ( val == "TRUE" || val == "1" ) @@ -764,7 +764,7 @@ TQString TQMYSTQLDriver::formatValue( const TQSqlField* field, bool trimStrings case TQVariant::CString: { // Escape '\' characters r = TQSqlDriver::formatValue( field ); - r.tqreplace( "\\", "\\\\" ); + r.replace( "\\", "\\\\" ); break; } default: diff --git a/tqtinterface/qt4/src/sql/drivers/odbc/tqsql_odbc.cpp b/tqtinterface/qt4/src/sql/drivers/odbc/tqsql_odbc.cpp index fda38a8..3401435 100644 --- a/tqtinterface/qt4/src/sql/drivers/odbc/tqsql_odbc.cpp +++ b/tqtinterface/qt4/src/sql/drivers/odbc/tqsql_odbc.cpp @@ -291,7 +291,7 @@ static TQString qGetStringData( STQLHANDLE hStmt, int column, int colSize, bool& } // if STQL_SUCCESS_WITH_INFO is returned, indicating that // more data can be fetched, the length indicator does NOT - // contain the number of bytes returned - it tqcontains the + // contain the number of bytes returned - it contains the // total number of bytes that CAN be fetched // colSize-1: remove 0 termination when there is more data to fetch int rSize = (r == STQL_SUCCESS_WITH_INFO) ? (tqunicode ? colSize-2 : colSize-1) : lengthIndicator; @@ -521,7 +521,7 @@ bool TQODBCPrivate::setConnectionOptions( const TQString& connOpts ) for ( TQStringList::ConstIterator it = raw.begin(); it != raw.end(); ++it ) { TQString tmp( *it ); int idx; - if ( (idx = tmp.tqfind( '=' )) != -1 ) + 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() ); @@ -863,7 +863,7 @@ TQVariant TQODBCResult::data( int field ) qWarning( "TQODBCResult::data: column %d out of range", field ); return TQVariant(); } - if ( fieldCache.tqcontains( field ) ) + if ( fieldCache.contains( field ) ) return fieldCache[ field ]; STQLRETURN r(0); TQSTQLLEN lengthIndicator = 0; @@ -963,8 +963,8 @@ TQVariant TQODBCResult::data( int field ) bool TQODBCResult::isNull( int field ) { - if ( !fieldCache.tqcontains( field ) ) { - // since there is no good way to tqfind out whether the value is NULL + if ( !fieldCache.contains( field ) ) { + // since there is no good way to find out whether the value is NULL // without fetching the field we'll fetch it here. // (data() also sets the NULL flag) data( field ); @@ -1443,9 +1443,9 @@ bool TQODBCDriver::open( const TQString & db, // Create the connection string TQString connTQStr; // support the "DRIVER={SQL SERVER};SERVER=blah" syntax - if ( db.tqcontains(".dsn") ) + if ( db.contains(".dsn") ) connTQStr = "FILEDSN=" + db; - else if ( db.tqcontains( "DRIVER" ) || db.tqcontains( "SERVER" ) ) + else if ( db.contains( "DRIVER" ) || db.contains( "SERVER" ) ) connTQStr = db; else connTQStr = "DSN=" + db; diff --git a/tqtinterface/qt4/src/sql/drivers/psql/tqsql_psql.cpp b/tqtinterface/qt4/src/sql/drivers/psql/tqsql_psql.cpp index db233ce..b5885bf 100644 --- a/tqtinterface/qt4/src/sql/drivers/psql/tqsql_psql.cpp +++ b/tqtinterface/qt4/src/sql/drivers/psql/tqsql_psql.cpp @@ -260,7 +260,7 @@ bool TQPSTQLResult::fetchLast() static TQPoint pointFromString( const TQString& s) { // format '(x,y)' - int pivot = s.tqfind( ',' ); + int pivot = s.find( ',' ); if ( pivot != -1 ) { int x = s.mid( 1, pivot-1 ).toInt(); int y = s.mid( pivot+1, s.length()-pivot-2 ).toInt(); @@ -336,7 +336,7 @@ TQVariant TQPSTQLResult::data( int i ) return TQVariant( pointFromString( val ) ); case TQVariant::Rect: // format '(x,y),(x',y')' { - int pivot = val.tqfind( "),(" ); + int pivot = val.find( "),(" ); if ( pivot != -1 ) return TQVariant( TQRect( pointFromString( val.mid(pivot+2,val.length()) ), pointFromString( val.mid(0,pivot+1) ) ) ); return TQVariant( TQRect() ); @@ -344,14 +344,14 @@ TQVariant TQPSTQLResult::data( int i ) case TQVariant::PointArray: // format '((x,y),(x1,y1),...,(xn,yn))' { TQRegExp pointPattern("\\([0-9-]*,[0-9-]*\\)"); - int points = val.tqcontains( pointPattern ); + int points = val.contains( pointPattern ); TQPointArray parray( points ); int idx = 1; for ( int i = 0; i < points; i++ ){ - int start = val.tqfind( pointPattern, idx ); + int start = val.find( pointPattern, idx ); int end = -1; if ( start != -1 ) { - end = val.tqfind( ')', start+1 ); + end = val.find( ')', start+1 ); if ( end != -1 ) { parray.setPoint( i, pointFromString( val.mid(idx, end-idx+1) ) ); } @@ -1080,7 +1080,7 @@ TQString TQPSTQLDriver::formatValue( const TQSqlField* field, default: // Escape '\' characters r = TQSqlDriver::formatValue( field ); - r.tqreplace( "\\", "\\\\" ); + r.replace( "\\", "\\\\" ); break; } break; diff --git a/tqtinterface/qt4/src/sql/drivers/sqlite/tqsql_sqlite.cpp b/tqtinterface/qt4/src/sql/drivers/sqlite/tqsql_sqlite.cpp index c94f595..864c4c9 100644 --- a/tqtinterface/qt4/src/sql/drivers/sqlite/tqsql_sqlite.cpp +++ b/tqtinterface/qt4/src/sql/drivers/sqlite/tqsql_sqlite.cpp @@ -250,7 +250,7 @@ bool TQSTQLiteResult::reset (const TQString& query) setActive(FALSE); return FALSE; } - // we have to fetch one row to tqfind out about + // we have to fetch one row to find out about // the structure of the result set d->skippedtqStatus = d->fetchNext(0); setSelect(!d->rInf.isEmpty()); @@ -450,7 +450,7 @@ TQSqlIndex TQSTQLiteDriver::primaryIndex(const TQString &tblname) const TQSqlQuery q = createQuery(); q.setForwardOnly(TRUE); - // finrst tqfind a UNITQUE INDEX + // finrst find a UNITQUE INDEX q.exec("PRAGMA index_list('" + tblname + "');"); TQString indexname; while(q.next()) { @@ -468,8 +468,8 @@ TQSqlIndex TQSTQLiteDriver::primaryIndex(const TQString &tblname) const while(q.next()) { TQString name = q.value(2).toString(); TQSqlVariant::Type type = TQSqlVariant::Invalid; - if (rec.tqcontains(name)) - type = rec.tqfind(name).type(); + if (rec.contains(name)) + type = rec.find(name).type(); index.append(TQSqlField(name, type)); } return index; |
